Deleting on repeater item database entry on button click.

I have a repeater that is connected to a dataset and I would like the option to delete one item that is in the repeater on a button click (also deleting the data entry for that one item). At one point I actually had it working where I passed in the ID of the database entry into a text element in the repeated container and then got the .text of that element and did a wix data remove function. However this no longer working for some reason. it used to work like this

var id = $w(‘#text7’).text ;

wixData.remove(“Duels”, id)
.then( (results) => {
let item = results;

} )
. catch ( (err) => {
let errorMsg = err;
} );

is there a way to do this?

See my answer here: https://www.wix.com/code/home/forum/community-discussion/delete-item-from-shoppingcart-on-button-click