wixData.query("Vote")
.eq("userId", userId)
.find()
.then( (results) => {
if(results.items.length > 0) {
let items1 = results.items.id;
Hi, everyone.
The above code functions as a query (of /to) the collection ‘Vote’ .
It queries the current userId with the field ‘userId’ in the database.
After the query I want to get (return) the items in the field ‘id’.
But the above code is not working. When running, it is returning ‘undefined’.
Fields →
‘undefined’
Thanks,
Ajith