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

82
Views
Receive MAP in a string variable

I was wondering how set the variable list as String.

const emails = [
  {"ID": "11109", "VALUE": "financesss@123m.com", "TYPE_ID": "EMAIL"},
  {"ID": "13429", "VALUE": "teste@testeeeee.com", "TYPE_ID": "EMAIL"}];

const list = emails.map(VALUE => VALUE.VALUE)

console.log(list) //desired result:: financesss@123m.com,teste@testeeeee.com
console.log(typeof list); //string
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can join an array into a single string with a delimiter by doing

const list = emails.map(VALUE => VALUE.VALUE).join(",");

The default delimiter for join is a comma (,) so you can express this as arr.join() should you wish.

See here for a definition of join: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join

about 4 years ago · Juan Pablo Isaza Report
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!