Passing an Array of Values to HTTP Request as an Expression
Hey, I'm trying to pass an array of values to the JSON body of the HTTP Request node, but I'm getting a comma-separated string instead of an actual array.
I managed to fix it by adding square brackets and using .map() to wrap each item in quotes:
"keywords": [{{ $json.output.keywords.map(k => `"${k}"`) }}]
It works, but I'm wondering — is there a simpler or more elegant way to achieve this?
6
1 comment
Damian Dąbrowski
3
Passing an Array of Values to HTTP Request as an Expression
AI Automation Society
skool.com/ai-automation-society
A community built to master no-code AI automations. Join to learn, discuss, and build the systems that will shape the future of work.
Leaderboard (30-day)
Powered by