JSON

In order to import JSON (or an array of objects), simply change the data input to [{ key: value }, ... ]. Grid.js expects each column to have a unique id field which matches the keys in the data object:

Live Editor
Result

tip

Grid.js tries to guess the id of columns by camelCasing them if column ID is not defined.

E.g. Phone Number becomes phoneNumber

Live Editor
Result

You can also leave the columns config empty if you want Grid.js to set the column names automatically:

Live Editor
Result
Last updated on by Afshin Mehrabani