Example of an unwind query in Jongo
<![CDATA[ db.getCollection(‘<collection_name>’) .aggregate([{$unwind : “$offers.offers”},{$match:{“offers.offers.seller.sellerId”:“999”}}]) ]]>
SyntaxHighlighter.highlight();
<![CDATA[ db.getCollection(‘<collection_name’) .aggregate([{$unwind : “$offers.offers”},{$match:{“offers.offers.seller.sellerId”:“999”}}]) Aggregate.ResultsIterator<class_name> products = <class_name>.<method_name>() .aggregate("{$unwind: ‘$offers.offers’}") .and("{$match:{offers.offers.seller.sellerId: #}}", String.valueOf(retailer.getId())) .as(<class_name> .class); ]]>
SyntaxHighlighter.highlight();