Got following .json:
[{
"STATUS": "0500",
"POSID": "..."
},
{
"STATUS": "1500",
"POSID": "..."
},
{
"STATUS": "0500",
"POSID": "..."
}]
Counted the values via countBy from lodash:
countData (data) {
return _.countBy(_.map(this.data, function (d) {
return d.status
}))
}
A table is generated where my status numbers and counts are displayed:
<tr v-for="(value, key) in countData">
<td>{{ key }}</td>
<td>{{ value }}</td>
</tr>
Now I want to sort that via value.
How can I accomplish that?