Join the Webstudio community

Updated 3 months ago

Collection array conditional append

At a glance

The community member has an array within a collection and wants to append a comma to all items except the last one, and is wondering if this can be done within the expression editor. The comments suggest that this is more about conditionally rendering content, and that the community member could try using backend logic or client-side JavaScript to achieve the desired result. There is no explicitly marked answer.

I have an array within a collection. I want the items to be appended with a comma... all except the last one. Can I do this within the expression editor?
O
J
5 comments
nope, its basically all about conditionally rendering stuff
at least for now
what's your use case from product you are building perspective?
I was going to try to make tags that are comma-separated. It's a test for myself. I was tying to see if I could figure it out, but I failed. haha
Either use backend for this logic or use client js
Add a reply
Sign up and join the conversation on Discord