Getting the data of item clicked in a repeater populated using an array

I have a repeater, which is being populated using an array rather than a dataset. I have a select button within each element of the repeater. On click of that button, I want to retrieve the data for that particular item. How can I do that?

With a dataset, we can use getCurrentItem(). How to retrieve the same when we are using an array to populate?

Got the answer for this one. We need to create a listener for each item’s button individually.

Hi try with this code.

let $item = $w.at(event.context);

const data = $w("#repeaterWhatever").data;

let clickedItemData = data.find(item => item._id === event.context.itemId)