Parsing JSON "value" responses

Hi everyone. I have an issue parsing a response from Firebase. I have taxi drivers who might miss jobs on the app while offline. When they return I want to look back through the jobs of the day to check the status of each one. If any show a status of new or declined I want to take some action and alert the driver.

The response I am getting appears to be a list of jobs and each job has a number of properties within it, including status and a jobID. So in the file attached here I get a response of 10 jobs with each job having 17 to 20 properties. Is this a list within a list or a flat file? I cant work it out.

I am currently using a count with loop to play with just a 3 or 4 results so things are more manageable. Does anyone know how to parse the attached JSON file to get the results I am after?
My rather pathetic attempts at blocking this are included here. I have tried using Create Object from JSON and Json from Object as well.


response.txt (5.0 KB)

See this quick project using your data.

I just selected two properties to show arbitrary
https://x.thunkable.com/projectPage/602ec2e70d7424001262ec68

Hope this can simplify the idea.

1 Like

@muneer . Thank you so much. That has really helped. I was totally lost on how to do this. Am I able to grab a copy to keep for my records?

1 Like

It’s yours. I did it because I feel this is easier than explaining in words.

Glad that it helped.

Thank you again. For my education I take it the response I have been getting is not two list as I thought but a result showing that the properties of a thing also have properties. Is that right?
So this block


reading from right to left takes the response. Gets the objects (Job318, 319 etc) and then gets each objects properties. If I am way off, dont worry about it. You have done more than enough…

1 Like

Yes you are right on your assumption. It is a list of JSON objects and each object has its own properties. So it is a list of objects, as you clearly said (Job318, Job319, …) and each of these objects have properties inside them and you need to cascade the object block in Thunkable walking in reverse which means the top most property, for example Status in the coding is the lower most property in the JSON response.

Feel free to inquire on anything that is not clear to you. If I don’t know it then there must be someone in the community who has better experience.