-6

[ { "id":1, "firstName":"Rahul", "lastName":"Kumar", "age":22, "gender":"Male", "qualification":"Btech", "mobileno":1234567891, "email":"r@xyz.com", "state":"Bihar" },

{ "id":2, "firstName":"Ram", "lastName":"Kumar", "age":20, "gender":"Male", "qualification":"Btech", "mobileno":1234567892, "email":"ram@xyz.com", "state":"Assam" } ]

1 Answers1

-2
console.log(users.[0]);

returns the object at index 0. To access only the 'id' property of the objec, do:

console.log(users[0].id);