Hello, I am trying to remove the values equal to null on my json. Despite the many solutions proposed on the different forums there is no solution on n8n. Here is the code I found. I tried to adapt it but it does not work. I want to specify that I am in a function items.
You were almost there. Just need to define the key you are checking. This can be done by looping the keys.
for (const key in item) {
if(item[key]===null){
delete item[key];
}
}
return item;
fanstastic, it works
thank you @BramKn
Hey @simon_Piquemal,
On a normal function node as it runs for all items you would probably need to use item.json otherwise it will just do one loop.
correct thank you very much works well now


