How to set the grid config dynamicly in the js?

the sample grid_config_json works well, but when copy the config in the js, there is an error: Uncaught TypeError: Cannot read property ‘length’ of undefined

image

Here you can find a simple tutorial ademonstrating the initalization of the dhtmlxGrid from the script:
https://docs.dhtmlx.com/grid__basic_initialization.html#step4configuringandinitializing
The similar behavior you can find in most of the samples:
https://dhtmlx.com/docs/products/dhtmlxGrid/samples/01_cell_types/03_excell_grid.html