find number of keys in json object code example
Example 1: js countKeys
let count = Object.keys(myobj).length
Example 2: js obj getting count of properties
let count = 0;
for (let k in myobj) if (myobj.hasOwnProperty(k)) count++;
let count = Object.keys(myobj).length
let count = 0;
for (let k in myobj) if (myobj.hasOwnProperty(k)) count++;