How to move all Data from one Collection to another

Good morning Wix Community,
I have a database which is fed by a repeater input element.
Since I need to have the repeater feeding Database empty when using it next time, I want to move all this data into a second, permanent, database with the same fields with an button_onClick event.
My code so far:

 export function buttonMoveToPerm_click(event) {
  moveToPerm() 
}
function moveToPerm  () {
 let toInsert = $w("#tempProductsDataset").getItems();
 //also tried  = wixData.query("TempProducts"); 
  wixData.bulkInsert("PermProducts", [toInsert])
  .then( (results) => {
 let inserted = results.inserted;
    console.log(results.inserted, "results inserted")
 let insertedIds = results.insertedItemIds;
       console.log(results.insertedItemIds, "inserted IDs")
 let updated = results.updated;
 let skipped = results.skipped;
 let errors = results.errors;
        console.log(results.errors, "errors")
  } )
  .catch( (err) => {
 let errorMsg = err;
  } );
}

The code is only creating one new empty item in the PermProducts database.
Console log shows:

1 results inserted
Array(1)        inserted IDs
0: "55825274-f748-431f-ac53-98a6821ee335"
Array(0)        errors

I have no coding experience, but with the Corvid Reference documentation I’ve been pretty good so far. This one is driving me nuts.

Can someone point out my mistakes?
Or suggest a better solution?

Thanks in advance!

Hey again,
with a little help of my friendand many console logs, we found the solution together:

function moveToPerm () {
wixData.query(“TempProducts”)
.find()
.then( (results) => {
// console.log( typeof (results));
// console.log(results);
wixData.bulkInsert(“PermProducts”, results.items)
.then( (results2) => {
console.log(results2);
// call function for deleting TempProducts here
} )
. catch ( (err) => {
console.log(err, “error bulk insert”);
} );
} )
. catch ( (err) => {
console.log(err, “error query”);
} );

Key is, that wixData.query returns results as a database search object. We only need the results.items out of it. WixData.bulkInsert takes those results.items and pushes them into the permanent Database.

When everything is ready, I’ll write a post of how I’ve managed to use an input repeater as part of an input form, instead of it alone.