cancel
Showing results for 
Search instead for 
Did you mean: 

Using Mapper to flatten my JSON with Array

jordanc
New Contributor II

I’m trying to flatten my object using a Mapper Snap before I export it to CSV. But I have been unable to map the fields coming in from the child records. Attached is a sample JSON file that represents my input.

Script_output0.json (2.8 KB)

I have tried using things like: $data[*][‘Email’] in the mapping table, but this and other attempts are falling flat. I can get data from a specific child record like this: $data[‘1’][‘Email’]. But of course I need to map the data from all of the records, not just a single one. I have read through the documentation on the Mapper Snap a few times, and I feel like I’m just missing something easy here.

Thanks in advance for taking a look!

1 ACCEPTED SOLUTION

Hi guys, you can also use $data.values()

image

View solution in original post

5 REPLIES 5

tarena
New Contributor III

@alchemiz, that is better. Thanks.