Baserow Multiple select to a concatenated string

## Describe the problem/error/question
I am creating a workflow: getting a list of my photography from Baserow with some multiple select field to describe the pictures as tags and running a custom chatGPT prompt before to re-inject the output to my database.

I have an issue with concatenating as a string all the multiple select value from baserow.
I tried by using the expression: {{$json[“Input_Tags_Location”].map(item => item.value).join(", ")}} but i get the invalid syntax
I will take the example of the Input_Tags_Location Object for which the expected output should be “Japan, Tokyo, Shibuya”

## What is the error message (if any)?

Screenshot 2023-08-05 122937

## My JSON File

[
{
“id”: 1,
“order”: “1.00000000000000000000”,
“Photography”: [
{
“url”: “https://xxxx.com/media/user_files/MyYhtQssLyFyNyyDNwQ44Z94PucqBFkw_ca3fb84b0e21a7267812da6664abf302feedac4a34e8449a2d856267da928a58.jpg”,
“thumbnails”: {
“tiny”: {
“url”: “https://xxxx.com/media/thumbnails/tiny/MyYhtQssLyFyNyyDNwQ44Z94PucqBFkw_ca3fb84b0e21a7267812da6664abf302feedac4a34e8449a2d856267da928a58.jpg”,
“width”: null,
“height”: 21
},
“small”: {
“url”: “https://xxxx.com/media/thumbnails/small/MyYhtQssLyFyNyyDNwQ44Z94PucqBFkw_ca3fb84b0e21a7267812da6664abf302feedac4a34e8449a2d856267da928a58.jpg”,
“width”: 48,
“height”: 48
},
“card_cover”: {
“url”: “https://xxxx.com/media/thumbnails/card_cover/MyYhtQssLyFyNyyDNwQ44Z94PucqBFkw_ca3fb84b0e21a7267812da6664abf302feedac4a34e8449a2d856267da928a58.jpg”,
“width”: 300,
“height”: 160
}
},
“visible_name”: “Shibuya crossing at night -Tokyo #2.jpg”,
“name”: “MyYhtQssLyFyNyyDNwQ44Z94PucqBFkw_ca3fb84b0e21a7267812da6664abf302feedac4a34e8449a2d856267da928a58.jpg”,
“size”: 1574345,
“mime_type”: “image/jpeg”,
“is_image”: true,
“image_width”: 2880,
“image_height”: 1920,
“uploaded_at”: “2023-08-03T14:12:35.660287+00:00”
}
],
“Input_Tags_Location”: [
** {**
** “id”: 8819,**
** “value”: “Japan”,**
** “color”: “darker-brown”**
** },**
** {**
** “id”: 8820,**
** “value”: “Tokyo”,**
** “color”: “darker-pink”**
** },**
** {**
** “id”: 8821,**
** “value”: “Shibuya”,**
** “color”: “dark-yellow”**
** }**
** ],**
“Input_Title”: “Shibuya Crossing at Night”,
“Input_Description”: “Long exposure Shibuya crossing at night, with its neon lights, lightened building, car light trays. This photography shows the dynamic of Tokyo city, a city that never sleep. This photo is taken at the shibuya crossing, with its thousands of people awaiting the lights to turn green to cross this iconic walking paths.”,
“Upd”: true,
“Media_title”: null,
“Media_caption”: null,
“Media_Alt Text”: null,
“Media_Description”: null,
“Product_Title”: null,
“Product_Description”: null,
“Product_SEO_Keyphrase”: null,
“Product_SEO_Meta Description”: null,
“Product_SEO_Title”: null,
“Product_Short Description”: null,
“Product_Tags”: null,
“Input_Tags_Photography”: [
{
“id”: 8845,
“value”: “Cityscape”,
“color”: “light-green”
},
{
“id”: 8846,
“value”: “Travel”,
“color”: “dark-gray”
}
],
“MidJourney_Prompt”: null,
“Input_Tags_Technics”: [
{
“id”: 8847,
“value”: “Long exposure”,
“color”: “light-green”
}
],
“Input_Tags_ShotTiming”: [
{
“id”: 8848,
“value”: “Night”,
“color”: “light-purple”
}
],
“Input_Tags_Elements”: [
{
“id”: 8854,
“value”: “Car light rays”,
“color”: “darker-purple”
},
{
“id”: 8864,
“value”: “Neon lights”,
“color”: “cyan”
}
],
“Input_Tags_Subject”: [
{
“id”: 8863,
“value”: “Shibuya crossing”,
“color”: “light-cyan”
},
{
“id”: 8865,
“value”: “People”,
“color”: “dark-yellow”
}
]
}
]

Thank you by advance for any solution.

Hi @Sebastien, welcome to the community!

Unfortunately, n8n expressions don’t fully support fat arrow functions (this will luckily change in the future).

So for this to work you would need to use the Code node, allowing you to run your function outside of the expression logic, like so:

This is the result:

I am sorry for the trouble this causes, hope the workaround helps :slight_smile:

Hello, Thanks a lot for the workaround

I also find another trick that give me the expected results:

{{ $jmespath($json.Input_Tags_Location, “[*].value”) }}