Currently, I am parsing through a considerable JSON file and handling key:value pairs within an object. The problem arises when I encounter a key that requires me to append another object to it, rather than simply overwriting it.
For instance:
var collection = {};
angular.forEach(items, function(item) {
collection[item.Id] = item.data;
//item.data is an object
});