for (var i=0; i<arr.length; i++) { if (arr[i]["style"]){ var style = arr[i]["style"]; var newElem = arr[i]; for(var property in style){ newElem.style[property] = style[property]; }}}