I have a function that returns the data as JSON. Due to the uncertainty of the return however, I need a way to grab all the key names and return as an Array.
I have tried to manually parse it as a String, however it does not seem to be working as there are different ways to format it. I have also tried to just use JSON normally and access it as myJSON.a
however as I already said, it has unpredictable returns. To visualize it:
// This could be what the function returns
{
a:"a",
b:"b",
c:"c"
}```
// Or this
{
d:"d",
a:"a",
c:"c"
}
// So accessing "myJSON.b" won't always work