Skip to main content
Question

Javscript code for nested JSON

  • June 28, 2021
  • 2 replies
  • 112 views

Hello everyone. I am new to zapier and I just started using webhook service. I am having an issue mapping my nested json keys to excel columns. The issue is that the default javascript code below: 

output = JSON.parse(inputData.nestedJSON);
output = [{output}];

only works for unnested json but my is nested. And it is only getting the values for the first level. Pls can someone help me out with how I can get to the nested levels so that I can map them to my excel.

Thanks.

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

2 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • June 28, 2021

Hi @Dannie 

Check out the related Topics for possible guidance: https://community.zapier.com/search?q=nested%20json


GetUWired
Forum|alt.badge.img+12
  • Zapier Solution Partner
  • June 29, 2021

Hi @Dannie 


Can you share what the raw response looks like? Possibly, screenshots of your set up?