Skip to main content
Question

Save JSON as a Single List or Pre-Separated Lists

  • October 29, 2024
  • 3 replies
  • 43 views

Problem:

  • I’m running an API to fetch a large JSON file cached on a server: https://data.vatsim.net/v3/vatsim-data.json
  • Using a Custom Request (via Webhooks By Zapier) to GET the desired file, it fetches it, and natively decodes and groups the headers across the whole JSON into a single text string, as below:
  • However, this removes the native grouping in the cached JSON;
     
  • This causes an issue because I want to parse the data in a further step using AI to interpret and extract what I want. At present I can’t reference the entire collection as a single text response (formatted as above in the html version).
  • Storing the result as a single variable would work, but I do not know how to do that (I’m a new user)
  • Ideally, I’d like to only save the “Controllers” section (as below) of the JSON to then move on and parse, as the full file is approx. 66,000 lines. My aim is to parse the online ‘controllers’ taking their station callsign and frequency to use in a further step;
     

    Thanks in advance :) 
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • 34032 replies
  • October 29, 2024

Hi @Luke_ 

Instead, use a Code step to make the API request and handle the API response however you’d like.

https://zapier.com/apps/code/help


  • Author
  • Beginner
  • 2 replies
  • October 29, 2024

Hi @Luke_ 

Instead, use a Code step to make the API request and handle the API response however you’d like.

https://zapier.com/apps/code/help

Thanks @Troy Tessalone! I was hoping for a walkthrough or a code snippet to help me get going, is that something you can help with? :) 


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • 34032 replies
  • October 29, 2024

@Luke_ 

Examples in the Code help links: https://zapier.com/apps/code/help

Code steps have AI to help configure the code: https://help.zapier.com/hc/en-us/articles/15666688064013-Generate-a-Code-step-using-AI-Beta

ChatGPT is a great resource for helping configure the custom code.