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

86
Vistas
Adding an element to JSON returned from a map loop with a final Promise.all

I'm using Retool and looking up records in a Firestore table by a Document ID.

The below code works great and returns an array of JSON objects. However it does not have the appIDs[?] used in the lookup. How can I add the appIDs ('id1','id3', or 'id2') as an additional element to the matching JSON object in the array? The order of the returned array of JSON objects is not necessarily the same order as the appIDs array.

var appIDs = ['id1','id3','id2'];

var metadatas = appIDs.map(row => {
  return qTile_description_v1.trigger({
    additionalScope: {
      appID: row
    }
  });
});

return Promise.all(metadatas.map(p => p.catch(error => null)));
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Answer in comments. Apparently the answer is easy since my statement that the order returned may not be the same as the order of the keys in the array is false. The order will be the same, so problem solved.

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