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

78
Vistas
Using Arrays within a Map

I'm rewriting an algorithm I originally wrote in C++, and looking for a similar implementation in JavaScript as what one would generally do in C++:

std::map<<std::string, std::vector<std::string>> my_map_of_vectors;

This is the closest I've got, but I'm struggling...

 var my_map = new Map();
 var array_history = [];

 // below within a for-loop...
 my_map.set(data_blob[row].s_col1,array_history.push({h_col1:data_blob[row].s_col2}));

And then to access the first element of the array, with a known key, I get nothing...

document.writeln(xer_map.get("GG1000").h_col1[0]);

Not sure where to go from here, any help is appreciated!

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