I want to make a repeater in my website that changes the products shown in it by some values that are determined earlier. so I have a collection of products that each of them has an array of collections that it is part of. currently, I’m able to successfully get all products that have a certain collection in the array, but I’m unsuccessful in filtering by the opposite of it, products that don’t have a ceratin collection in the array.
this is my current code:
let dataQuery = wixData . query ( “Stores/Products” );
let filters = getFilters ()[ 5 ];
if ( filters === ‘true’ )
{
dataQuery = dataQuery . hasAll ( “collections” , “blossoming” );
} else
{
dataQuery = dataQuery . not ( dataQuery . hasSome ( “collections” , “blossoming” ));
}