I want the text set for each of the values returned. However, when I call the API and access these variables, my text is set to null. I am not sure what I am missing here and why my .json file is not returning anything. Is there something special I need to do? This is a static .json file that is updated dynamically by a PHP script. So, any time the PHP script is called, it updates the .json file with current data. I should then be able to pull this static .json file into the app using the Web API component. I’m not sure where I’m going wrong on this. Can anyone see what’s causing this to return null?
The JSON response you are is an array, as it has [ ] in it. You need to access the first element of the array from the object first, then add the property name. Let me know if this works
Edit:@muneer I missed you reply @ronnie both of our replies are based on the same approach btw.
I would have arrived of some semblance of that eventually, because I wouldn’t want a user to think it’s broken. I typically throw “N/A” text in just so they see something and know the data is not there.
And, I did discover it was a problem with my script. No idea why, since I encoded the text as JSON. However, I discovered that the static file needed to be decoded and then encoded as JSON again. Once I did that, it worked like a charm!