I’ve got the jsw working and can call it from the front end, I still don’t know how to limit the fields returned and also how do I present the results to the front end so they can be presented in a table?
This is the backend code.
import wixData from ‘wix-data’ ;
export function queryApplications(Email) {
wixData.query( ‘Applications’ )
.eq( “applicantEmail” ,Email)
.find()
.then((results) => {
console.log(results.items);
})
. catch ((err) => {
console.log(err);
});
}
Previously when all i the front end, the results of the query could be put straight into my table
function query_Data(){
wixData.query( “Applications” )
.eq( “applicantEmail” , $w( “#input1” ).value)
.find()
.then(res => {
console.log(res)
$w( “#table1” ).rows = res.items;
});
}
How do i get results.items to the front end?