let newArr =
{
"example": "name",
"word": 12,
"word": "noone",
"word": "2014",
"result": [
{
"name": "Ivan",
"age": "20"
},
{
"name": "OIga",
"age": "30"
}
]
};
let newArr2 = [ ];
let newArr =
{
"example": "name",
"word": 12,
"word": "noone",
"word": "2014",
"result": [
{
"name": "Ivan",
"age": "20"
},
{
"name": "OIga",
"age": "30"
}
]
};
let newArr2 = newArr.result.map(el => el.age * 2);
let newArr3 = newArr.result.map(el => {
return {name: el.name, age: el.age * 2};
});
console.log(newArr2);
console.log(newArr3);