I have following type of JSON Data
[
{"Col1": "Server1", "Col2": "57", "Col3": "Create", "Col4": "Details" },
{"Col1": "Server2", "Col2": "27", "Col3": "Create", "Col4": "Details" },
{"Col1": "Server3", "Col2": "89", "Col3": "Create", "Col4": "Details" },
{"Col1": "Server4", "Col2": "75", "Col3": "Create", "Col4": "Details" },
{"Col1": "Server5", "Col2": "77", "Col3": "Create", "Col4": "Details" },
{"Col1": "Server6", "Col2": "55", "Col3": "Create", "Col4": "Details" }
]
Now what I need is Col1, Col2, Col3 and Col4 in some array so that I can put those as headings to the dynamic table that I need to create..
Any idea on how to get these values in an array?
You can use
$.each loopto iterate and store the values into an array.Check Fiddle