Iterate through data

Hi, I am using Zoho Analytics to extract some data. The format looks something like this

{
“data”: [
{“Rank”:“1”,“Country”:“United States”,“Gold”:“46”},
{“Rank”:“2”,“Country”:“Great Britain”,“Gold”:“27”},
{“Rank”:“3”,“Country”:“China”,“Gold”:“26”}
]
}

I am trying to iterate but it simply refuses. I have tried to parse through it, still refuses. Any ideas on how I can break this down?

Data is an array, so just put that into an array iterator after that module like this:

Output

1 Like

Yes this will work definitely , I have tried too from this It worked

Did you parse it first?

I keep getting this when I try to Parse through it

The quotes surrounding this are smart quotes (“ ”), you need to change them to normal double quotes like this: (").

Also, when pasting JSON into the “Parse JSON” module’s JSON field, you need to do a “text-only” paste, using the keyboard shortcut in Windows CTRLSHIFTV

1 Like

So do I need to run a replace function to change this “” to this ‘’?

You shouldn’t have to, unless Zoho is returning invalid JSON.

Could you please share screenshots of the module fields and filters in question? It would really help other community members to see what you’re looking at.

You can also export the scenario blueprint file to allow others to replicate the issue. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826

Uploading it here will look like this:

blueprint.json (12.3 KB)

If possible, could you also please provide the input/output bundles of the modules by running the scenario, then clicking the bubble on the top-right of each module, taking screenshots of, and copying the contents into this discussion thread:

Screenshot_2023-08-29_100800

This will allow others to better assist you. Thanks!

2 Likes

Hello

Finally managed, there was an issue with the json, had a small quote somewhere, got rid of it. Thanks again for the support

3 Likes

No problem, glad I could help!

Just for future reference, if you are finding your JSON invalid, I use this tool to find out exactly where the issue is:

Paste your JSON on the left, and click Validate or Format, and the output will be on the right side.

2 Likes