How to list data in datatables out of an object of objects?
How to list data in datatables out of an object of objects?
hAtul89
Posts: 12Questions: 7Answers: 0
I am trying to list data in my table from this kind of object:
var data = {
"jaxm":
{
"name": "Tiger Nixon",
"position": "System Architect"
},
"jaxb" :
{
"name": "Garrett Winters",
"position": "Accountant"
}
}
And it's so weird for me that I couldn't find a way to do this.
Is this possible? Or should I sanitize my data and turn it to an array?
This discussion has been closed.
Answers
Hi @hAtul89 ,
Yep, you'll need to sanitize it - the array of objects is the way to go!
Cheers,
Colin