how to show object keys and values in javascript code example
Example 1: get all keys of object in javascript
myObject = {
"key": "value",
"key2":"value2"
}
Object.keys(myObject);
//console.log(Object.keys(myObject)) = ["key", "key2"]
Example 2: check all values from keys in object js
Object.values(obj).some(val => val !== false)