Table inside cell

Tags: #<Tag:0x00007efc6492dd50>

I have a json
[{
“ID”: 1,
“CompanyName”: “Electronics Depot”,
“Address”: “2455 Paces Ferry Road NW”,
“State”: “Georgia”,
“Zipcode”: “”,
“Phone”: “(800) 595-3232”,
“Fax”: “(800) 595-3231”,
“Website”: “http://www.nowebsitedepot.com”,
“City”: [{ “Tree”: “1”, “Leaves” : “2”,“Branches”:“3” }]
}, {
“ID”: 2,
“CompanyName”: “XYZ”,
“Address”: “ABC”,
“State”: “Karnataka”,
“Phone”: “(800) 595-3232”,
“Fax”: “(800) 595-3231”,
“Website”: “NA”,
“City”: [{ “Tree”: “1”, “Leaves” : “2”,“Branches”:“3”,“Root”:“4” }]
}, {
“ID”: 3,
“CompanyName”: “WXY”,
“Address”: “ABC”,
“State”: [{ “Tree”: “1”, “Leaves” : “2” }],
“Phone”: “(800) 595-3232”,
“Fax”: “(800) 595-3231”,
“Website”: “NA”,
“City”: [{ “Tree”: “1”, “Leaves” : “2” }]
}]

I want my table to appear as

that is i want to create a nested table with the nested json i have
Can anyone help me with that , how to achieve that.

Hi @thakurshivam100

Handsontable does not fully understand nested objects. You can see it here https://jsfiddle.net/2cxfmpbn/. It just flattens the objects and skippes arrays. If yu’d like to add extra information to a cell you’d (in most cases) need to create a custom renderer.

Here are a couple of example of curstom editors https://handsontable.com/docs/7.2.1/demo-conditional-formatting.html
If you do not allow users to change the data (you just display it) that should meet your requirements.