I am receiving a JSON as response from my API, i have to display that data into table structure.
Consider JSON as follows:
[
{
"key1":"value1",
"key2" :"value2"
},
{
"key1":"value3",
"key2" :"value4"
}
]
But key1
and key2
is not fixed, it will change each time, so i have to display the content received from API as Table structure. I referred a lot nothing is regarding dynamic keys.
I referred this https://medium.com/codingthesmartway-com-blog/angular-material-part-4-data-table-23874582f23a
But have to display dynamic content.
EDIT
I want the below structure:
key1 key2
value1 value2
value3 value4
Create Table from JSON Data with angularjs and ng-repeat answerBy SantoshK
is want i need i think so but its showing blank table for me.