I have one question. Why this method return object? In other part of my code i cant use forEach method.
objectToArrayOfObjects: function (obj, additionalProperties) {
var arrayOfObjects = [];
for (var name in obj) {
if (obj.hasOwnProperty(name)) {
var generatedObject = {name: name, value: obj[name]};
arrayOfObjects.push(_.extend(generatedObject, additionalProperties));
}
}
console.log(typeof arrayOfObjects); // return object
return arrayOfObjects;
},