Data transformation - Function node

I need help executing the “Function Item” node.
I have a customer dataset and I need to handle the phone numbers (telefoneCliente) to a valid format. Then add the new data together with the customer data (or update the old one).
I already tried the “Function” node but it only returns a value. I implemented an if…else but no success.
What should I do?
The Java Script algorithm needed to handle the data I was able to implement in the “Function” node, but I couldn’t in the “Function Item” node.

Hi @RRonan,
the Function Item node I am seeing should work, that’s strange. Can you try out the following workflow and tell me if it’s working? The Customer Datastore node is a demo node returning demo data.

Your input data is just an array of objects, right?

Hi @marcus thanks for the reply.
I managed to solve it. My lines of code weren’t spelled correctly.