added newObjectFrom

This commit is contained in:
Martin Donnelly 2016-04-01 11:33:25 +01:00
parent 03ba3f83dc
commit 9b6118aa37

View File

@ -37,11 +37,11 @@ module.exports = {
} }
return rObj; return rObj;
}, populateObject(source, reform) { }, populateObject(source, dest) {
var rObj = {}; var rObj = dest;
for (var item in reform) { for (var item in source) {
if (source.hasOwnProperty()) { if (source.hasOwnProperty(item)) {
rObj[item] = source[reform[item].from]; rObj[item] = source[item];
} }
} }