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](https://secure.gravatar.com/avatar/e7c20622021a0929d232d38759365a73/?default=https%3A%2F%2Fvanillicon.com%2Fe7c20622021a0929d232d38759365a73_200.png&rating=g&size=120)
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