85
rated 0 times
[
86]
[
1]
/ answers: 1 / hits: 32055
/ 11 Years ago, mon, april 22, 2013, 12:00:00
I have an array of data like this:
var nameInfo = [{name: Moroni, age: 50},
{name: Tiancum, age: 43},
{name: Jacob, age: 27},
{name: Nephi, age: 29},
{name: Enos, age: 34}];
If I have an object like this:
var nameInfo = {name: Moroni, age: 51};
Is there a simple way that I can update the variable nameInfo. The key
between these is the name column. I know there is a way that I could
do this by searching for the row, removing and adding but I would like
to have a way to do this where I updated the row. Note that if it helps I do have underscore.js loaded.
More From » underscore.js