Aniket Narvankar

Aniket Narvankar

  • 818
  • 1.7k
  • 310.4k

Bind Complex JSON object to html table

Jul 8 2020 3:13 AM
I am consuming a web api in my application from the web api I am getting response in following format
 
"item1": {
"Data": {
"xyz": {
"total": 23,
"used": 6,
"available": 17
},
"abc": {
"total": 21,
"used": 5,
"available": 16
},
"def": {
"total": 18,
"used": 5,
"available": 13
},
},
"code": "an"
}
 
I want to bind this to html table in following format
 
Name  Details  total  used  available  code
item1  xyz  23  6  17  an
item1  abc  21  5  16  an
item1   def  18  5  13  an
  
Kindly help on this as I am not understanding how to access inside properties,for example inside item1 there is Data and code inside data there are three objects xyz,abc,def and each have 3 properties total,used,available whic I have to display in table. And code property value is an
 
Kindly guide me on this

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (3)