I wants to find out the object which holds the smallest value of a key in an array.
var tempArr = [{name: 'john', age: 23}, {name: 'jonny', age: 27}, {name: 'roony', age: 13}, {name: 'david', age: 33}];
I want the result to be
{name: 'roony', age: 13}
without using for loop is there any direct way to find out the result, like we can do for plain array
for example: if array is -
var arr = [11,4,22,3,5,55];
we can achieve the same by:
Math.min.apply(null, arr)