I am getting a String with the structure of JSONArray [ { "abc" : "123" }, { "def" : "456" } ]which I need to use to call mongoCollection.aggregate(theString);
The aggregate function takes List<? extends Bson> and I am not sure what is the best way to convert the String to List<? extends Bson>.
For find() method which takes Bson var1 I am just converting the String to Document using Document.parse(theString);
I am using mongodb 3.4.