I created this fiddle to and it works well as per my requirements: Fiddle
However, when I use the same in my application I get an error in the browser console saying
You need to switch single quotes ['] to double quotes ["] because of parse
[']
["]
if you are using data-order attribute on the table then use it like this data-order='[[1, "asc"]]'
data-order='[[1, "asc"]]'