Describe the problem/error/question
Hello,
I would like to join information from multiple tables for each element of my array. In this case, I want to retrieve the user name in UserList node from his ID in the Customer object. This type of operation is easy in sql, but seems complicated in json.
Is it also possible to send the UserID to a workflow for each of the elements of an array and add the result to each element? Some fields I have to make API calls to retrieve the information.
Every time I try the merge node, I end up with the result outside the array like this
[
{
"UserList.Name": "Name2",
"CustomerCard": [
{
"No": "Cust1",
"Name": "Name1",
"UserID": 21,
},
{
"No": "Cust2",
"Name": "Name2",
"UserID": 22,
},
{
"No": "Cust3",
"Name": "Name3",
"UserID": 21,
}
]
}
]
Please share your workflow
Share the output returned by the last node
I expect something like this :
"CustomerCard": [
{
"No": "Cust1",
"Name": "Name1",
"UserID": 21,
"UserList.Name": "Name2"
},
{
"No": "Cust2",
"Name": "Name2",
"UserID": 22,
"UserList.Name": "Name3"
},
{
"No": "Cust3",
"Name": "Name3",
"UserID": 21,
"UserList.Name": "Name2"
}
]
Information on your n8n setup
- n8n version: 1.62.4
- Database (default: SQLite): SQLite
- n8n EXECUTIONS_PROCESS setting (default: own, main): own,main
- **Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud **
- Operating system: Whatever the cloud version use