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

174
Views
get object response value

I got a response from the backend the response is an object how can I get the arrays from the object I tried to use Object entries but I can't get the arrays can you please help meenter image description here

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You can use a for:

Example:

const cars = ["BMW", "Volvo", "Saab", "Ford", "Fiat", "Audi"];

let text = "";
for (let i = 0; i < cars.length; i++) {
  text += cars[i] + "<br>";
}

document.getElementById("demo").innerHTML = text;

Source: https://www.w3schools.com/js/tryit.asp?filename=tryjs_loop_for

about 4 years ago · Juan Pablo Isaza Report

0

You are looking for the Object.values to retrieve just the value part of your object.

Example:

const object = {
  "20-01-22": ['a', 'b', 'c'],
  "21-01-22": ['b', 'c'],
  "22-01-22": ['d', 'f']
};

const arrays = Object.values(object)

// => [['a', 'b', 'c'], ['b', 'c'], ['d', 'f']];
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!