Previously, I have created tables with XML formatted results and JSON data in the "key: data" format. To access the data, I would use syntax like results.heading1 and then map the data into a table by matching the key with the data.
Now, a new client is only able to send their data in a different format where the keys are all listed in the first row rather than alongside each entry. Despite researching extensively online, I haven't found a solution that fits my specific situation!
How can I create a table when the keys (headings) are not positioned next to the data, but instead appear in the initial row of results?
The JSON data at hand looks like this. When I make an API call to the client, the response mirrors the structure shown below:
resultReturn: {
success: true,
results: [
"ID, Name, Age",
"A1, Bob, 31",
"B1, John, 24",
"C2, Doe, 160",
],
resultsHTML: ""
}