Describe the question
How do I add a nested json object into a node as a parameter?
As a user I need to add nested json to a node.
Because the receiving api expects a post to come in with fully formatted deep json.
To be very specific, Iterable is expecting to get an array of tags.
Whenever I add nested Json to a post request the other side gets “objects” instead of properly formatted JSON.
So effectively I cannot seem to send properly formatted deep json. Imaging trying to use a node to send the JSON below.
For example imagine you are using Iterable - Iterable supports json objects as a datatype.
so normally username would come in a a simple KeyValue Pair. And Tags would need to come in as an array or at least formatted JSON
Example of Iterable node configuration. Hitting the endpoint of update user
Key: UserName
Value: Mike
Key: Email
Value: [email protected]
Key: Tags
Value:{
"TagName": data,
"TagDate": data
}
-OR An Array-
Key: Tags
Value: [ {
"TagName": data,
"TagDate": data
},
{
"TagName": data,
"TagDate": data
}
]
And ideally I would be able to build that Tag in a code block, and merge it in similarly to the photos below.
And it seems like the Key is using the expression area to unwrap the object so it can be transmitted as json
What is the error message (if any)?
When I try to add a piece of nested Json to any api call it shows up on the other side as [object]
Examples in photos
Please share the workflow
I cannot really share the workflow because conceptually it is just so small the screenshots are more telling.
Share the output returned by the last node
This is what I am trying to send.
On the other side it shows up looking like this
Information on your n8n setup
- n8n version:0.179
- Database you’re using (default: Postgres):
- Running n8n with the execution process [own(default),]:
- Running n8n via [Docker]: