How to create a new collection from a given collection , the new collection should have some specific fields only in MongoDb?

Viewed 5

I am using the below query and getting double data in the output collection

        db.product_catalog.aggregate([ 
          {$match:{manufacturer:"mi"}},
          {$project:{manufacturer:1,model:1}},
          {$out:"newcollection"}
        ])    
0 Answers
Related