0

The object list is looks like that in Javascript

Object {Not In Build Scope: 37, Incomplete: 1}

I am not sure how to get the "Not In Build Scope", "Incomplete" and their value.

Please kindly help.

Todd Mark
  • 1,847
  • 13
  • 25
Chris Mok
  • 83
  • 1
  • 3
  • 9

1 Answers1

0

You can use Object.keys() to get the keys of that object and with each key, you can get the corresponding values, like this

> var dataObject = {
...     "Not In Build Scope": 37,
...     "Incomplete": 1
... };
> var keys = Object.keys(dataObject);
> var values = keys.map(function(key) {
...     return dataObject[key];
... });
> keys
[ 'Not In Build Scope', 'Incomplete' ]
> values
[ 37, 1 ]
thefourtheye
  • 233,700
  • 52
  • 457
  • 497