> Faqs > How to add / pull HTML data to a javascript object ?
Esta Faq no ha sido aprovada por el equipo de moderadores de DesarrolloWeb.com por no seguir las normas de publicación de preguntas.

How to add / pull HTML data to a javascript object ?

Hola,

Como puedo hacer para mostrar todo el contentido de esta matriz sin tener que separar el contentido guardado en cada objecto con difrenetes propiedades ? Estoy tratando de consturir un grid de servicios y el objectivos es que el contenido (datos alamcenados en cada objecto) cambie cuando el usuario haga click en cada tarjeta.

Here is what I tried....

    xport const servicesdata = [
  {
    id: 1,
    title: "Physiotherapy",
    image: "https://atriumphysiotherapy.com/images/stretching.jpg",
    descriptionp1:
      "Our physiotherapists are highly-educated experts in physical function, movement and mobility. They have advanced knowledge of how the human body moves and what stops it moving and use specialized hands-on treatment to restore, maintain and maximize optimal function and quality of life.",
    descriptionp2:
      "Our physiotherapists assists, diagnose and treat physical symptoms and limited movement caused by injury, aging, disability, or medical condition. They help patients understand what’s causing their condition, and work with them to restore, maintain and maximize movement, flexibility and physical independence.",
    descriptionp3:
      "Our physiotherapists develop customized treatment plans that help patients take back control. They teach patients how to restore, maintain and/or maximize movement, reduce pain, and manage any chronic symptoms.",
    descriptionp4:
      "Our physiotherapists excel in the treatment of many conditions: back pain/injury, whiplash, pregnancy-related muscle/joint issues, urinary incontinence and vertigo to name a few. They also help patients manage symptoms of chronic conditions like arthritis and chronic pain.",
    descriptionp5:
      "Our physiotherapists help patients who may have otherwise tried temporary (e.g., prescription drugs) or more invasive methods (e.g., surgery) to manage their condition. They use individualized therapeutic exercise, manual therapy and other treatment techniques.",
    descriptionp6:
      "Through physiotherapy, many patients are able to recover unrestricted movement which promotes the kind of physical independence necessary for a normal lifestyle and work. When it comes to assessing and treating people with movement problems, the services of a physiotherapist are often essential.",
    image: "https://atriumphysiotherapy.com/images/stretching.jpg",
    subtitle: "What Can I Expect During My First Appointment?",
  },
  {
    id: 2,
    title: "123",
    image: "../../assets/images/servicesimg/physiotherapy.jpg",
    subtitle:
      "Lorem ipsum dolor sit amet consectetur adipisicing elit. Saepe quas iusto exercitationem possimus nam corrupti? Debitis hic quo accusamus aliquam? Nobis deleniti ducimus impedit ad aut, numquam ipsa nam eveniet.",
  },

Hay alguna mas efectiva de almacernar el contentido dentro de cada objecto?

Este sitio es en español Damián. Gracias, acabo de publicar una pregunta similar en castellano.

Respuestas

Todavía no se han recibido respuestas a esta pregunta. ¿Quieres enviar la primera?