What no code formula should I be using for this?

In Xano I have a database table called “data” where I have 2 columns - “id” and a list/array of “titles”. (Example: [Title 1, Title 2, Title 3])

I have an id stored in a variable in Weweb. (Example: 50)

I want to bind the initial value of an input field to show the list of titles for a given id, depending on what id is in the variable.

image

For example if the variable says “50”, I want to display the list of titles for id 50 of the database table, returning something like [Title 1, Title 2, Title 3] depending on what’s on the table.

I do not want to show everything in the collection, just the titles for that particular ID.

How do I do this in Weweb / nocode formula?

It would look something like this:

But you’ll need to swap parts out for your use case.

Swap out ‘user’ with the collection you want to filter
Swap out ‘Item[‘data’[‘tweetedBy’]’ with your variable
And swap ‘.name’ with whatever the field you want to retrieve is called, so ‘.titles’ I’m guessing

You can also use a nocode formula filterByKey

filterByKey(yourCollection, 'id', idValue)