I’m attempting to insert a new record into a collection that I’ve created. I’ve created a string field in the schema called “userID”. When I run an insert using the code below, a duplicate field named “[userID]” is created. Any insight as to why this is happening?
My simple code:
const toInsert =
{ ‘userID’ : wixUsers.currentUser.id
}
wixData.insert(“CookProfile”, toInsert)
.then( (newuserrecord) => {
let item = newuserrecord;
} )
. catch ( (err) => {
console.assert(err);
} );