Tag Archives: “layui.js:4 Uncaught TypeError: Cannot create property ‘LAY_TABLE_INDEX’ on string ……”

[Solved] layui Error: “layui.js:4 Uncaught TypeError: Cannot create property ‘LAY_TABLE_INDEX’ on string ……”

Layui reported an error “layui. JS: 4 uncaught typeerror: cannot create property ‘lay_table_index’ on string…”

Read the information from the cloud database with PHP applet, and an error will be reported if it is placed in the layui. Later, I put the returned JSON into the local test, and found that it is because the data in res.data is of string type, and layui requires JSON object type,

So we just need to turn every piece of data in res.data

Above figure: