Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Obtain smallest value from array of objects in Javascript

myArray.sort(function (a, b) {
    return a.Cost - b.Cost
})

var min = myArray[0],
    max = myArray[myArray.length - 1]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Obtain #smallest #array #objects #Javascript
ADD COMMENT
Topic
Name
6+7 =