javascript - Update a property on list of object array and then retrieve the updated list -


i have list of object array shown below.i need apply moment.tz("2013-11-18 11:55", "america/toronto"); lastupdate properties , retrieve updated new array.so how can ?.i can use underscore.js.thanks in advance.

enter image description here

any reason simple loop won't work?

for(var = 0; < progress.length; i++) {     progress[i].lastupdate = moment.tz(progress[i].lastupdate, 'america/toronto'); } 

or

     progress.foreach(function (x) {         x.lastupdate= moment.tz(x.lastupdate, 'america/toronto');      }); 

Comments

Popular posts from this blog

python 3 IndexError: list index out of range -

android - How to save instance state of selected radiobutton on menu -

IF statement in MySQL trigger -