Datatable, remote MySQL data, JSON

In a datatable, if I’m getting data from a URL (API), I know Webix expects the data to come in an array named “data”. Is there any way to tell it the data is in an array named “records” instead?

Hello, @dmcconnell68

There are two possibilities to change the data array.
First of all, you could do that via [DataDriver] (Data Drivers of Guides, Auxiliary Resources Webix Docs). It’s necessary to create a custom getRecords DataDriver method, which returns an array of all records in the data source. Inside of this custom method you should redefine the data that should be returned.
Please, pay attention, that when you use the data parse or load method, you should pass data type as the second parameter.
On the other hand, you could work with the DataStore onParse method and redefine data there.
Here is the snippet:Code Snippet