Case sensitive worked… for part of it.
I’m still getting this error: ReferenceError: wixdata is not defined in this line of code:
wixdata . query ( “Diamond” )
Here is the code:
import wixData from ‘wix-data’ ;
$w . onReady ( async function () {
let RESULTS = await checkData ();
console . log ( "RESULTS: " , RESULTS );
});
function checkData (){
wixdata . query ( “Diamond” )
. find ()
. then (( res )=>{ return res . items })
. catch (( err )=>{ console . log ( err );});
}