title: Mongoose Query: how to find object array
body: <p>If you send json data in the following format, the server tries to go through the item document of mongodb and write the code that returns the data with the same userId and exactly the same json data received by itemTag.</p>
  
  <p><strong>I have this schema:</strong></p>
  
  <pre><code>var subSchema = mongoose.Schema({
    main:Number,
    sub:Number,
    color:Number
  },{ _id : false });
  
  var ItemSchema = new Schema({
      userId:String,
      date:String,
      itemTag: [subSchema]
  }, { versionKey: false });
  </code></pre>
  
  <hr>
  
  <p><strong>db data :</strong></p>
  
  <pre><code>{ 
     "_id" : ObjectId("58ba81eea341c37ed7268703"),
     "date" : "20170304_175923", 
     "userId" : "aaa", 
     "itemTag" : [ 
         { 
             "main" : 3, 
             "sub" : 7,  
             "color" : 1
         }, { 
             "main" : 3, 
             "sub" : 1,  
             "color" : 11
         }, { 
             "main" : 4, 
             "sub" : 4,  
             "color" : 1
         }, {
             "main" : 5, 
             "sub" : 2,  
             "color" : 1
         } 
      ] 
  },
  { 
     "_id" : ObjectId("58ba81eea341c37ed7268723"),
     "date" : "20170305_125923", 
     "userId" : "aaa", 
     "itemTag" : [ 
         { 
             "main" : 3, 
             "sub" : 7,  
             "color" : 1
  
         }, { 
             "main" : 2, 
             "sub" : 2,
             "color" : 2
         } 
      ] 
  }
  </code></pre>
  
  <p>**and client send json data  : ** 
  server get 
  req.body.userId
  req.body.itemTag</p>
  
  <pre><code>{ 
      "userId":"aaa",
      "itemTag":[{
          "main":3,
          "sub":7,
          "color":1
      },{
          "main":4,
          "sub":4,
          "color":1
      }]
  }
  </code></pre>
  
  <p><strong>and i want get :</strong></p>
  
  <pre><code>{ 
     "_id" : ObjectId("58ba81eea341c37ed7268703"),
     "date" : "20170304_175923", 
     "userId" : "aaa", 
     "itemTag" : [ 
         { 
             "main" : 3, 
             "sub" : 7,  
             "color" : 1
         }, { 
             "main" : 3, 
             "sub" : 1,  
             "color" : 11
         }, { 
             "main" : 4, 
             "sub" : 4,  
             "color" : 1
         }, {
             "main" : 5, 
             "sub" : 2,  
             "color" : 1
         } 
      ] 
  }
  </code></pre>