Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

152
Vistas
Vue: return filtered list

I have an api which returns the following categories and attributes: enter image description here

No I try to render a list of the attribute_name of each category. The result should look something like this, but I need checkboxes instead of radio buttons: enter image description here

I tried to filter the attributes from the category_id but it doesn't work. With the following code I just get a list of all the attributes

  <ul>
    <li
      v-for="category in categories"
      v-bind:key="category.name"
    >
      <p
        v-for="attributes in category.attributes"
        :key="attributes.attribute_name"
      >{{ attributes.attribute_name }}</p>
    </li>
  </ul>

Does anyone has an idea how I could filter these attributes into their categories? Thanks a lot in advance!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Something like this is what I think you want. If it is not please try to clarify what you need.

<ul v-for="category in categories" :key="category.name">
  {{category.category_name}}
  <li
    v-for="attributes in category.attributes"
    :key="attributes.attribute_name"
  >
  <input type="checkbox" :id="attributes.attribute_name">
    <label :for="attributes.attribute_name">
      {{ attributes.attribute_name }}
    </label>
  </li>
</ul>
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda