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

203
Vistas
Reder only specific key value based on another key value with Javascript in React component

In my React application I need to grep the url with "type": "Three"?

How to find and return only specific key value based on another key value with Javascript?

From the api I get an array of images:

   "images": [
        {
          "url": "https:example/c18336d6-61ee-4c7c-be6b-397352b6fd63",
          "type": "One"
        },
        {
          "url": "https://example/c18336d6-61ee-4c7c-be6b-397352b6fd63",
          "type": "Two"
        },
        {
          "url": "https://example/c18336d6-61ee-4c7c-be6b-397352b6fd63",
          "type": "Three"
        },
      ]
    },

Then in my React component I want to use this value:

    const MyComponent = () => {

      const items =
        nodes.map((item) => {
            return {
              myImage: // Here I need e.g. the url value of the images array with type = Three.
                       // Like https://example/c18336d6-61ee-4c7c-be6b-397352b6fd63
            };
          }) || [];

   return <Slides items={items} />

  export default MyComponent;
about 4 years ago · Juan Pablo Isaza
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