How to use complex json api in Datatable
How to use complex json api in Datatable
I'm trying to fetch all the information from an API in a Datatable JS. The API Structure is like
{
"Success": {
"Meta": {
"Id": "124578828",
"Action": "ItemList",
"Type": "Item"
},
"Body": {
"TotalItems": 18,
"Item": [
{
"Category": "Clothing",
"ItemId": 12354,
"Attributes": {
"name": "Tee 1",
"brand": "Brand 2",
"material_type": "Cotton",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore"
},
"Inventory": [
{
"Status": "active",
"stock": 20,
"Images": [
"images/tee1_01.jpg",
"images/tee1_02.jpg",
"images/tee1_03.jpg",
"",
"",
"",
""
],
"Sku": "TEE-001233",
"Url": "#",
"price": 20,
"Available": 12
}
]
}
]
}
}
}
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
See if this Nested Objects Example helps.
Kevin
Sorry did not helped much :'( :'(
Maybe you can provide more information like what data, from the JSON, do you want to display?
Here is a example with your JSON:
http://live.datatables.net/lezocuwe/1/edit
The Data Manual may help.
Kevin
Thanks !