json get keys javascript code example
Example 1: js get json keys
myObject = {
"key": "value"
}
Object.keys(myObject); // get array of keys
Example 2: json get key
var jsonData = {person:"me", age :"30"};
console.log(Object.keys(jsonData)[0])
// Prints person