masterpage.js
import wixData from ‘wix-data’ ;
$w . onReady ( async function () {
let RESULTS = await checkData ();
console . log ( "RESULTS: " , RESULTS );
});
function checkData (){
wixData . query ( “Diamonds” )
. find ()
. then (( res )=>{ return res . items })
. catch (( err )=>{ console . log ( err );});
}
specific page
$w . onReady ( async function () {
let RESULTS = await checkData ();
console . log ( "RESULTS: " , RESULTS );
});
function checkData (){
wixdata . query ( “Diamonds” )
. find ()
. then (( res )=>{ return res . items })
. catch (( err )=>{ console . log ( err );});
}

…and I opened up all the permissions