I get following array from a API query in JSON
{
"category": [{
"id": 28,
"name": "Dogs"
},
{
"id": 14,
"name": "Cats"
},
{
"id": 878,
"name": "Sheep"
}]
}
The output I need is a joined list - Dogs,Cats,Sheep
I tried figuring it out with Javascript code and found some codes using .map but apparently those functions are not available.
Can someone help please ?
Use the Query JSON column:
$join(category.name,', ')
The method that Darren shared is great! Just tried with JS because you have mentioned that couldn’t do this with JS and I wanted to know if that is true!

( Hope I’m correct with the code! If not please let me know because love to fix them and learn! )
Here’s what I got! :


JavaScript Code :
const categories = JSON.parse(p1);
const names = categories.category.map(category => category.name);
const csv = names.join(',');
return csv;
Thank you
You should start using JSONata if you get access to the column Darren mentioned. It’s much shorter than normal JS.
Perfect…it worked as you said…