hi there, i have a simple json from which i am trying to delete field Attachements. sometimes it can come as array and sometimes not. please see my mapping in the attached pipeline. for somereason it complains the field doesnt exist.
Any pointer on whats happening.
to delete field_2022_11_05.slp (13.2 KB)
This post looks like a follow-up to your other post Ignore mapping if empty.
Try the attached pipeline to help your use case. With a modification to your pipeline, this one replaces your mapper with one that uses the object.filter() method of SnapLogic’s expression language and simply deletes the “attachments” key while leaving the remainder of the object as-is, and is not impacted if “attachments” is not in the object.
Community.13788.v1.slp (7.6 KB)
thanks @del. my requirement changed slightly so wanted to start fresh.
but this is what I was looking for. appreciate your help.