Hi @victormiranda,
That is an array so you would need to use items[0] if you want just the first one.
Quick Edit… Below is an example workflow that will show you what to do, The trick is in your function have return [items[0]];
"name": "My workflow",
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"values": {
"number": [
{
"name": "id_customer",
"value": 1234
}
],
"string": [
{
"name": "id_order_po",
"value": "abc123"
},
{
"name": "firstname",
"value": "Jon"
},
{
"name": "email",
"value": "[email protected]"
}
]
},
"options": {
"dotNotation": false
}
},
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
500,
310
]
},
{
"parameters": {
"values": {
"number": [
{
"name": "id_customer",
"value": 4321
}
],
"string": [
{
"name": "id_order_po",
"value": "133aaa"
},
{
"name": "firstname",
"value": "Bob"
},
{
"name": "email",
"value": "[email protected]"
}
]
},
"options": {
"dotNotation": false
}
},
"name": "Set1",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
500,
460
]
},
{
"parameters": {},
"name": "Merge",
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
700,
380
]
},
{
"parameters": {
"functionCode": "return [items[0]];"
},
"name": "Function",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
900,
380
]
}
],
"connections": {
"Set1": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Set": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Start": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
},
{
"node": "Set1",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Function",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"id": 8
}```