Append baseurl to list of images using N1QL


#1

Hi,

I have following query which gives me list of imgaes, I want to append baseurl to every image, how do I write such query to append baseurl to every Image.

select pictures from pins where meta(pins).id='6868f1ea-3229-4448-8699-f8a1086d64af';

Above query gives me result in following format

[
  {
    "pictures": [
      "21f38a44f46244b59b6c672119d0ce02.png",
      "6f9da42f633d43f3ad33b3ad654c6068.png"
    ]
  }
]

I want result above query to give me result in following

[
  {
    "pictures": [
      "<baseurl>/21f38a44f46244b59b6c672119d0ce02.png",
      "<baseurl>/6f9da42f633d43f3ad33b3ad654c6068.png"
    ]
  }
]

#2
SELECT  ARRAY "<baseurl>/"||v FOR v IN pictures END AS pictures 
FROM pins 
WHERE meta(pins).id="6868f1ea-3229-4448-8699-f8a1086d64af";

#3

@vsr1 thanks a lot that solved my problem.