storeChildren : function(coreid, data) {
$.each(data, function(id, type) {
$.core.children[coreid] = {};
$.core.children[coreid]['id'] = id;
$.core.children[coreid]['type'] = type;
});
}
($.core.children is an object)
I want the resulting array/object (I prefer objects) to look like this (excuse my PHP pseudocode):
array(coreid => array(id=>type, id=>type, id=>type));
I know I am overwriting $.core.children[coreid] each time I run the loop I just don't know how to fix it.
var obj = { key: value, key: value, ... }