object key method code example
Example 1: js get object keys
myObject = {
"key": "value"
}
Object.keys(myObject); // get array of keys
Example 2: get all keys of object in javascript
myObject = {
"key": "value",
"key2":"value2"
}
Object.keys(myObject);
//console.log(Object.keys(myObject)) = ["key", "key2"]