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

Hi
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.

There is already a widget called Bear Table implementing the same features but I am not able to customize it for my scenario.It only works in the example. If I create my own JSON and pass it, the table does not work.

Also I have tried to use the example as below
https://curran.github.io/screencasts/introToAngular/exampleViewer/#/22
http://community.bonitasoft.com/questions-and-answers/custom-widget-property-type-support-json-data-bonita-7
but with No success.

Could someone share some complete code / Example where Json Data from Form is bound to angular table and if possible to sort the data there based on choice.

Thanks

With a little Tweak , I was able to bind JSON data from a Form Designer page to a Html table using ng-repeat.
But when I try to assign Rest Api output to the Table , It doesnt work.
any ideas how to assign REST Api output to a html table using Bonita Custom Widget.

Thanks