How can I get the object length ?
In console my object looks like this:
Object { 2: true, 3: true, 4: true }
.length w
.length
var keys = Object.keys(objInstance); var len = keys.length;
Where len is your "length."
There may be circumstances I haven't thought of where this doesn't work, but it should do what you need, given your example.