How can I get the object length ?
In console my object looks like this:
Object { 2: true, 3: true, 4: true }
.length w
.length
it can be get by below code simply
var itemsLength = Object.keys(your object).length;