#Simple Javascript question

1 messages · Page 1 of 1 (latest)

lilac parrot
#

At the risk of being embarrassed because I should know this stuff by now... Array joining

#

I've tried every which away to join the elements in an array returned from a query. It should be a one-liner no-brainer I know: here's what I get (in txtMermaid) a lot of [object Object] texts.

lilac parrot
#

My goal is one text field as opposed to a table or array.

warm stagBOT
#

Hi there!
Can you share a sample of the kind of array you want to join?

cinder shell
#

@lilac parrot if you're trying to join values from an array of objects, you can try this:

{{_.map(f_Item_mermaid.data,'name').join(", ")}}
lilac parrot
#

perfect! Thank you! I never would've figured that one out!