Use object of objects instead of an array
hugohow opened this issue · comments
How-Choong Hugo commented
Hello, Thanks for this great library !
Is it possible to use an object like this :
var list = {
1: {id: 1, rompalu: 'baconing', zibbity: 'simba'},
2: {id: 2, rompalu: 'narwhal' , zibbity: 'mufasa'},
3: {id: 3, rompalu: 'a mighty bear canoe', zibbity: 'saddam hussein'}
}
instead of a list like :
var list = [
{rompalu: 'baconing', zibbity: 'simba'}
, {rompalu: 'narwhal' , zibbity: 'mufasa'}
, {rompalu: 'a mighty bear canoe', zibbity: 'saddam hussein'}
];
Thanks for the response !
Matt York commented
Nope.
But you can convert the object into an array:
var newList = [];
for(var x in list) {
newList.push(list[x]);
}