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

252
Views
splitting a dynamic string to store in separate variable

I have a dynamic string like below one getting from server.it may be more than 2.

[{text :'AC Maintenance today ', value:16.00, color: '#DEE3E8'},{text :'test3', value:150.00, color: '#5A0C55'}]

How to get each values in a separate js variable. for eg

var text = ["AC Maintenance today","test3"];
var value = [16.00,150.00];
var color = ["#DEE3E8","#5A0C55"]
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

var values = [{text :'AC Maintenance today ', value:16.00, color: '#DEE3E8'},{text :'test3', value:150.00, color: '#5A0C55'}]

const text = values.map((v) => v.text)
const value= values.map((v) => v.value)
const color= values.map((v) => v.color)
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!