eg.
var myObject = {
'item_123': {
'id': 1,
'name': 'Some name'
},
'item_789': {
'id': 2,
'name': 'Another name'
}
};
The number part of the item attribute/object is not known before hand since they are unique ids and are auto generated. Is it possible to get item count from myObject without looping through it?
In modern browser,s you can use
Object.keys:For cross-browser support, you have to loop through the object, though.