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

93
Views
Create String from Array Javascrpit Jquery

I have an Array [[9,222,3],[9,222,4],[9,333,1],[9,333,2],[9,444,1]] whare first element is static secound element is main number and third element is sub-number

I want to create string that contain main number forward by underscore "_" and its sub numbers then Slash and continue..

solution look like 222_3_4/333_1_2/444_1

thanks in advance.

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

You didn't explain the logic, but here is an example that will give you a good starting point for what you need and is similar to what I've understood.

let arrData = [
  [9, 222, 3],
  [9, 222, 4],
  [9, 333, 1],
  [9, 333, 2],
  [9, 444, 1]
].map((item) => {
  return `${item[1]}_${item[2]}_${item[0]}`;
}).join('/');

console.log(arrData);

about 4 years ago · Santiago Gelvez 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!