Get Item _id from clicked repeater item set using data property

I am trying create a favourite button on a repeater which, when clicked, inserts a reference of the current user into the dataset for the repeated item. I need to set the onClick for the button to return the _id vaule of the repeated item and send it into my insertReference function. I have the following:

$w.onReady(async function () {
 let user = wixUsers.currentUser
 let userid = user.id

 let result = await wixData.query("SubmittedProjects")
        .eq("approved", "Approved")
        .descending("approvedDate")
        .not(
            wixData.query("SubmittedProjects")
            .eq("size", "test")
        )
        .find()
 await connectRepeater1(result.items)
 await connectRepeater2(result.items)

    $w("#favourite").onClick((event) => {
 const data = $w("#repeater").data;
 let clickedItemData = data.filter(item => item._id === event.context.itemId)
        console.log(clickedItemData)
 let clickedItemID = clickedItemData._id
        console.log("user " + userid)
        console.log(clickedItemID)
        favourite(clickedItemID, userid)
    })
})

The issue I am having is that clickedItemID seems to be returning undefined. Can anyone help identify what is going wrong here?

@iaindowner Like you, when I’ve used this approach to get the data from a repeater row, I’ve intuitively expected clickedItemData to be an object. It turns out that it’s not. It’s an array, and clickedItemData[0]._id returns the _id value for the repeater row.

That has done the trick - if only I asked this 4 days ago. Thanks @anthonyb