Forum Discussion
@swright, not sure why you would require a complex setup. Is the processing complicated to be had in a separate pipeline. Most of the snaps process at document level, so you don’t have to loop, including REST snaps.
Hi Sripathi,
I’m new to Snaplogic. I would love to have a simple setup. The CSV parser snap produces a json file with a separate array element for each id. I need to create endpoints for each ID to and pass the endpoints to REST snaps. It seems like I need to execute the REST snap once for each url that is created using the PersonNumber from the csv. In many programing languages this would be done using a loop. It would take the first PersonNumber, get/create the endpoints for the REST snaps and run the REST snaps then move on to the next PersonNumber and do the same with each PersonNumber until there are no more PersonNumbers in the array.
I don’t know how to do this. Are there any examples?
Thanks,
Scott
Thanks, Amit
If i understand your requirement, you are trying to get the highlighted section from the below API response
So, your output from the mapper should be ‘EBSPERSON_550542’ right ?
- amit_saroha4 years agoNew Contributor III
@Dheeraj - Yes, this is exactly what I am looking for.
@amit.saroha
I have copied the JSON Splitter to a JSON Generator snap and the following expressions works fine in a mapperjsonPath($, "$[?(value['ns0:IntegrationName']=='EBSPERSON')]['ns0:ContentId']")
Also, attaching the pipeline just in case you need it for reference
Test Expr - Community_2022_06_29.slp (4.9 KB)