score:14

Accepted answer

Grab the first item in your array using [0], which returns an object in your case. Then you can call .Id on it to get the id.

var array1 = [
    {
      Id: 1, 
      Categories: 200 
    },
    {
      Id: 2, 
      Categories: 100 
    }
];

var first = array1[0];

console.log(first, first.Id);


Related Query

More Query from same tag