Find elements in a collection where an element has a field which is a list and a given value must belong to the list Find elements in a collection where an element has a field which is a list and a given value must belong to the list mongodb mongodb

Find elements in a collection where an element has a field which is a list and a given value must belong to the list


Think you have just flipped there order. Please try:

Criteria.where("stringArray").in(theValueIamlookingFor)

instead of the above