Suppose I have the following object in JavaScript:
var object = {
"key1": "value1",
"key2": "value2",
"key3": "value3"
};
How do I find out how many values exist in the object?
You can do that by using this simple code:
Object.keys(myObject).length