Table created manually, how to sort by a column manually?

I have a page that creates a table dynamically from the results of a query and then do a manual summary to get the totals by player.

It’s not connected to a dataset so I can not use a filter. Is there a way to sort the table by a different column from the query results?

Here is where I create the table dynamically. I need to sort by Total points, which is “col2”.
$w(“#tblstandings”).columns = [
{
“id”: “col1”,
“dataPath”: “person_name”,
“label”: “Player”,
“type”: “string”
},
{
“id”: “col2”,
“dataPath”: “total_points”,
“label”: “Total Points”,
“visible”: true ,
“type”: “number”
}
];

Hi,

You can use sort() for whichever column you want.

Good luck,

Yisrael