filtering query by negative

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” ));
}

const arrayOfValues = ['val1', 'val2'/*....*/];
let dataQuery = wixData.query("Stores/Products");
arrayOfValues.forEach(e => {
dataQuery = dataQuery.ne('fieldKey', e)
})
dataQuery.find()
.then(results => {
//do whatever you wish
})

The problem I think you are having is that the .query() method does not INCLUDE the referenced field key (Collections). So you won’t be able to filter without retrieving all the items using the .includes() method and then apply any filter you want/need.