HTML table

Show Rest API output inside a Html table and have sorting capability implemented for the table

My requirement is that I am returning JSON data from a REST Api call. I need to bind that Data to a table .
For this , I have used standard table widget from the designer . It works fine.
But a part of the Requirement is to be able to have the functionality to sort the data as well based on users choice of any parameter.
I have explored quite a few examples of this in different angular js tutorials but I am not sure how to implement the same in Bonitasoft custom widget.