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

231
Views
How can access a object property value from Objects contains array of objects in Js

i got ane object contains array of objects.

Object {
  "isLoadingAPI": true,
  "orgAPIData": Array [
    Object {
      "color1": "#009fe8",
      "color2": "#9c3ab4",
      "color3": "#0bb694",
      "face": true,
      "fingerprint": "true",
      "id": 1234,
      "messageLimit": 10,
      "name": " הטסטים משרד",
      "visible": true,
    },
    Object {
      "color1": "#009fe8",
      "color2": "#9c3ab4",
      "color3": "#0bb694",
      "face": true,
      "fingerprint": "true",
      "id": 3245,
      "messageLimit": 15,
      "name": "טסט",
      "visible": false,
    },
    Object {
      "color1": "#009fe8",
      "color2": "#9c3ab4",
      "color3": "#0bb694",
      "face": false,
      "fingerprint": "false",
      "id": 333,
      "messageLimit": 10,
      "name": " התחבורה משרד ",
      "visible": true,
    },
    Object {
      "color1": "#009fe8",
      "color2": "#9c3ab4",
      "color3": "#0bb694",
      "face": true,
      "fingerprint": "false",
      "id": 9112,
      "messageLimit": 10,
      "name": "פלאריום",
      "visible": true,
    },
    Object {
      "color1": "#009fe8",
      "color2": "#9c3ab4",
      "color3": "#0bb694",
      "face": false,
      "fingerprint": "true",
      "id": 1008,
      "messageLimit": 10,
      "name": "ספיאנס",
      "visible": true,
    },
  ],
}

So here i want to access all "messageLimit" value from above list.

i want to store values in a global variable.

lets say if i am going to console that variable i should get only the values (10,15,10...) like this.

How can i achieve this?

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

0

You can achive this by Arrays map method.

The arrays map method takes a function as parameter and what ever this function returns will be returned in your results.

So it can be like this.

  var messageLimits = object.orgAPIData.map(oapi=>oapi.messageLimit)
about 4 years ago · Juan Pablo Isaza Report

0

You can use map function:

const messageLimits = object.orgAPIData.map(apiData => apiData.messageLimit);
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!