Hey!
As to leave only those “key”: “value” pairs that are not equal to the given value, in this case, you need to leave everything except “uuid”.
Instead, everything needs to be returned except “uuid”.
In general, I see the task more broadly.
You need to configure the functional node so that you can add keys there, which you do not need to transfer further.
Are there any options for solving the problem?
You can do it with a Function-Node and code like this:
const deleteKeys = ['uuid'];
items.forEach(item => {
deleteKeys.forEach(key => {
if (item.json[key]) delete item.json[key];
});
});
return items;
Probably not the most efficient code but works.
Jan, thanks a lot!
How to apply this script for several keys at the same time?
You can add the keys that you want to delete to the deleteKeys array. For example, if you want to delete the uuid and status you can use const deleteKeys = ['uuid', 'status']; instead of const deleteKeys = ['uuid'];
harshil1712, thanks!
