Search code examples
yuiyui3yui-datatable

how to refresh yui3 datatable with updated json data


I want to refresh datatable using new data in json format.

I tried using below method but it is giving error mentioned

var myData = table.get('data');
myData.add(json_data);  

Error in console log:

invalid 'in' operand config
userTargets = (config && BUBBLETARGETS in config); 

Please can someone shed some light if there's any other menthod to refresh yui3 datatable using new data

Thanks in advance.


Solution

  • It worked fine when I used eval to json_data (which was encoded in Perl from string into Json format)

    table.set('data', eval(json_data));