# Data transformation - Function node

**URL:** <https://community.n8n.io/t/data-transformation-function-node/16481>\
**Category:** Questions\
**Tags:** data-transformation, function\
**Created:** [August 8, 2022, 11:54pm UTC](https://community.n8n.io/t/data-transformation-function-node/16481 "2022-08-08T23:54:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RRonan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/rronan/32/15762_2.png) [@RRonan](https://community.n8n.io/u/RRonan)\
**Post date:** [August 8, 2022, 11:54pm UTC](https://community.n8n.io/t/data-transformation-function-node/16481/1 "2022-08-08T23:54:58Z")

</div>

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.

 ![Function Item Node](https://europe1.discourse-cdn.com/n8n/original/2X/3/3bf01765222631564d954106face691b177e6aae.jpeg)

---

<div class="post-metadata">

**Author:** ![marcus](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/marcus/32/15989_2.png) [@marcus](https://community.n8n.io/u/marcus)\
**Post date:** [August 9, 2022, 6:44am UTC](https://community.n8n.io/t/data-transformation-function-node/16481/2 "2022-08-09T06:44:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![RRonan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/rronan/32/15762_2.png) [@RRonan](https://community.n8n.io/u/RRonan)\
**Post date:** [August 15, 2022, 3:06pm UTC](https://community.n8n.io/t/data-transformation-function-node/16481/3 "2022-08-15T15:06:02Z")

</div>

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