โ04-09-2023 03:43 PM
You have a response from an API endpoint that brings a huge number of fields. There are few obsolete fields that you want to remove in the pipeline. What is the best way to handle this in Mapper snap?
โข Add only the fields to be removed from the Input schema and leave the Target Schema as blank with Pass through.
โข Add all the required fields from the Input Schema and map to Target Schema
โข Add all the required fields from the Input Schema and map to Target Schema with Pass through
โข Add the fields to be removed to the Target Schema and pass null values in the Input Schema with Pass through.
โ04-10-2023 12:35 PM
Hi @svedantam,
Good day, you can use the Object filter method
e.g.
$.filter((val,key)=> ['obsolete_field1','obsolete_field2','obsolete_field3','obsolete_field4','obsolete_field5'].indexOf(key) == -1)
Thanks,
MM
โ04-10-2023 07:49 PM
Thanks alchemiz