{"ScriptPreparationCode":"var fruits = [\r\n {name:\u0022banana\u0022, amount: 2},\r\n {name:\u0022apple\u0022, amount: 4},\r\n {name:\u0022pineapple\u0022, amount: 2},\r\n {name:\u0022mango\u0022, amount: 1}\r\n];\r\n\r\nsortBy = (key) =\u003E {\r\n return (a, b) =\u003E (a[key] \u003E b[key]) ? 1 : ((b[key] \u003E a[key]) ? -1 : 0);\r\n};","TestCases":[{"Name":"lodash orderby","Code":"_.orderBy(fruits, [\u0027amount\u0027],[\u0027asc\u0027]);","IsDeferred":false},{"Name":"native sort","Code":"fruits.sort((first, second) =\u003E first - second);","IsDeferred":false}]}