Here is an array that needs to be updated:
let arr = [ { "Id": 0, "Name": "Product 1", "Price": 10 },
{ "Id": 0, "Name": "Product 1", "Price": 15 } ]
I am looking for a way to add 1
to all the Price
values, resulting in:
let Final_arr = [ { "Id": 0, "Name": "Product 1", "Price": 11 },
{ "Id": 0, "Name": "Product 1", "Price": 16 } ]
Any suggestions on how to achieve this? Thanks! ;)