Supports querying MongoDB by array of strings

Support lookup Mongo Id by array of strings

One of the simplest use cases is to get input data in the form of an array and then look those up in your MongoDB to get relevant info. Right now, the $in operator is not supported in the n8n framework because when you have an array in state and try to access its elements it un-stringified those elements.

I saw a relevant closed topic on supporting _ids and thought this might be a key feature needed for others too Simple MongoDB find by _id? [GOT CREATED].

For example, say my in memory variable is productList = [“234234abc”, “765464bcd, “534322efg”]. On the Mongo component, if I do {”_id":{"$in":{$json[“productList”]}}} then it will interpret that as {"_id":{"$in":[234234abc, 765464bcd, 534322efg] }} and it will break because it does not recognise ‘a’ as a number.

In essence, it is auto cast-typing the contents of an array as int