I want to get the key from the JSON Array?
This is my JSON Array
****JAVASCRIPT****
var employees = [
{ "firstName":"John" , "lastName":"Doe" },
{ "firstName":"Anna" , "lastName":"Smith" },
{ "firstName":"Peter" , "lastName": "Jones" }
];
From this JSON I need the result key. I mean "firstName", "lastName", not John, Anna, Peter Please help to get the keys from JSON.
employees[0].firstnamewill returnJohn,employees[1].firstnamewill returnAnnaand so on.