I have the following data
shots = [ {id: 1, amount: 2}, {id: 2, amount: 4} ]
Now I\'m trying to get the object which
You can use this code. It will simply return the highest amount.
Math.max.apply(Math,shots.map((shot)=>{return shot.amount;}));