The problem:
I have 10 items in a collection.
All items have just 1 field with the id “moods”.
Half the items under field id “moods” have the string “at the movies”.
The other half has the string “fun and funny”.
How do I count just those items that are listed as “at the movies”?
Here’s my code so far:
function moods () {
wixData . query ( “Music_theRoom” )
. contains ( “moods” , “at the movies” )
. count ()
. then (( num ) => {
let numberOfItems = num ;
trkcou = numberOfItems ;
$w ( “#text493” ). text = trkcou . toString ();
tracks (); // for use by audio player
});
}
Thank you so much.