Saving updated repeater data

Hi,
Im working on saving edited repeater item data. I have tried multiple ways and it is always creating new item in collection instead of updating current item. Can someone guide me with the code? Thanks guys!

$w('#repeater2').onItemReady(($item, data, index) => {
        $item('#sendButton').onClick(() => {

let toInsert = {
 "points1":        $w('#input6').value,
 "points2":        $w('#input7').value,
 "points3":        $w('#input8').value,
 "points4":        $w('#input9').value,
 "points5":        $w('#input10').value
};

   $w('#sendButton').hide();
   $w('#loadingGIF').show();
   wixData.update("MainCollection", toInsert)
  .then( (results) => {
 let item = results; 
    $w('#text73').show();
    $w('#loadingGIF').hide();
setTimeout(() => {
    wixWindow.openLightbox('Great')
   }, 300);
  } )
  .catch( (err) => {
 let errorMsg = err;
 $w("#text74").text = errorMsg
 $w("#text74").show();
  } );
  } );
  } );
 // This function was added from the Properties & Events panel. To learn more, visit http://wix.to/UcBnC-4
 // Add your code for this event here: 
}

@Ahmad @J. D.

In order to update an item, you must include the _id in the object you wish to update.

@jonatandor35 thanks for reply.
I found another way and its working great now. Now the only problem is that everything happens so quick, that loadingGIF does not show. Where is the best place for timeOut or debouncetimer?

export async function sendButton_click_2(event, $w, data) {
    $w('#sendButton').hide();
   $w('#loadingGIF').show();
 let $item = $w.at(event.context);
 let points1 = $item("#input6").value;
 let points2 = $item("#input7").value;
 let points3 = $item("#input8").value;
 let points4 = $item("#input9").value;
 let points5 = $item("#input10").value;
 let totalpoints = $item("#input11").value;
 $w('#dataset2').setFieldValue("points1", points1),
 $w('#dataset2').setFieldValue("points2", points2),
 $w('#dataset2').setFieldValue("points3", points3),
 $w('#dataset2').setFieldValue("points4", points4),
 $w('#dataset2').setFieldValue("points5", points5),
 $w('#dataset2').setFieldValue("totalPoints", totalpoints)
    $w('#text73').show();
    $w('#loadingGIF').hide();
 return await $w("#dataset2").save();
 // This function was added from the Properties & Events panel. To learn more, visit http://wix.to/UcBnC-4
 // Add your code for this event here: 
}