With a list of objects like this:
var products = [
{productName: "Soap", qty: 2},
{productName: "Shampoo", qty: 3},
{productName: "Spray", qty: 1}
];
What would be the most efficient method to return the object in this list with the highest qty? (e.g. an alternative to use a for loop)
If there are two objects with the same qty, it would be ok to just return the first object with the highest qty in the list.