Forum Discussion

kindminis's avatar
kindminis
New Contributor
2 years ago
Solved

SnapLogic Metadata Read - Parsing Question

Hi All,  I am looking to simply parse out the snaps used in a pipeline using the metadata read snap. However, I am having trouble getting the output of the snap_map.property_map.info.label.value to ...
  • ivicakoteski's avatar
    2 years ago

    Hi kindminis ,

    You can try the following expression in the mapper snap after the SnapLogicRead snap. 

     

    $snap_map.keys().map(x=> {"PipelineId":$_id,"PipelineName":$property_map.info.label.value,"SnapId":$snap_map.get(x).instance_id,"SnapName":$snap_map.get(x).property_map.info.label.value})

     


    This expression will iterate over all snaps included in the $snap_map and produce an array with your expected elements. You will also need the JSON Splitter snap to get the table form.

    BR.
    Ivica.