06-03-2020 02:53 AM
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?
06-03-2020 09:16 AM
@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)
06-03-2020 01:18 PM
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?
06-03-2020 02:23 PM
That’s correct:
Map<String, Object> data = document.get(Map.class);
06-03-2020 02:56 PM
See also Snap Development Documentation