I'm trying to sort some json in js. And I'm trying to sort by the sum of "numbers", in a descending order. So for this data, the second row data would be first, since the sum of "numbers" is larger. I figured out how to sort by anything else, but not by the sum.
{
"rows":[
{
"key":0,
"name":"whitelilac",
"numbers":[
10,
40,
5
],
"options":[
"yes",
"no",
"maybe"
],
"comment":"content"
},
{
"key":1,
"name":"blacklilac",
"numbers":[
5000,
10,
20
],
"options":[
"yes",
"no",
"maybe"
],
"comment":"content"
}
],
"more":false
}