Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

76
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!