Get Json output from Mapper snap

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?

@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)

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?

That’s correct:

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

See also Snap Development Documentation

1 Like