cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Get Json output from Mapper snap

JiWon
New Contributor II

Hi, I am trying to get the output of the Mapper in my custom snap.
How should I write the code in my custom snap to get the Json object from the Mapper?

Capture

5 REPLIES 5

robin
Former Employee

@JiWon I donโ€™t fully understand. If the next Snap is your custom Snap, the output document of the Mapper can be consumed via input views as per the developer documentation. In terms of the expression language, $ refers to the entire input document (which can be serialized/deserialized to/from JSON)

JiWon
New Contributor II

Hi Robin,
Thanks for your reply.
Yes, the Mapper connects to my custom snap in which I wanna get the data from the mapper. Can I use document.get(Map.class) to get the data from the Mapper?

ptaylor
Employee
Employee

Thatโ€™s correct:

Map<String, Object> data = document.get(Map.class);

robin
Former Employee