title: Find By ID and Remove From MongoDB array
body: <p><strong>My Collection:</strong></p>
  
  <pre><code>  geoGraphicalFilter: {
      aCountries: [String],
      aCities: [String],
      aCoordinates: [{
        coordinates: { type: Array }
      }]
    }
  </code></pre>
  
  <p><strong>CollectionData</strong></p>
  
  <pre><code>"geoGraphicalFilter": {
              "aCoordinates": [
                  {
                      "_id": ObjectId("5acb641d93fa0e52557fc6aa"),
                      "coordinates": [
                          [
                              72.42919972527011,
                              23.0437703991947
                          ],
                          [
                              72.45031407464302,
                              23.045823913521474
                          ],
                          [
                              72.43263295281557,
                              23.030500782775746
                          ],
                          [
                              72.42919972527011,
                              23.0437703991947
                          ]
                      ]
                  },
                  {
                      "_id": ObjectId("5acb641d93fa0e52557fc6ac"),
                      "coordinates": [
                          [
                              72.51520207511979,
                              23.038241551175616
                          ],
                          [
                              72.55399754632015,
                              23.03934733892872
                          ],
                          [
                              72.51812031852671,
                              23.025129376064214
                          ],
                          [
                              72.51520207511979,
                              23.038241551175616
                          ]
                      ]
                  },
                  {
                      "_id": ObjectId("5acb641d93fa0e52557fc6ad"),
                      "coordinates": [
                          [
                              72.44653752434493,
                              23.02828905299478
                          ],
                          [
                              72.4896245299627,
                              23.02828905299478
                          ],
                          [
                              72.45477727044641,
                              23.0194417709901
                          ],
                          [
                              72.44653752434493,
                              23.02828905299478
  
  
              ]
                  ]
              },
              {
                  "_id": ObjectId("5acb641d93fa0e52557fc6ab"),
                  "coordinates": [
                      [
                          72.47451832878957,
                          23.045350028380867
                      ],
                      [
                          72.50576069939376,
                          23.04835127278581
                      ],
                      [
                          72.47949650871226,
                          23.031606634051897
                      ],
                      [
                          72.47451832878957,
                          23.045350028380867
                      ]
                  ]
              }
          ],
          "aCities": [],
          "aCountries": []
      }
  </code></pre>
  
  <p><strong>Remove From Database Snippet</strong></p>
  
  <pre><code>const deleteZones = (req,res,next) =&gt; {
    var body = _.pick(req.body, ["zones"]);
    var zoneList = body.zones;
    debug(zoneList)
    var promise = function() {
      return new Promise(function(resolve, reject) {
        zoneList.forEach(itemA =&gt; {
          console.log(itemA.coordinates)
          huntingModel.update(
            { _id: req.body.id },
            { $pull: { 'geoGraphicalFilter.aCoordinates':  itemA.id} },
            (error, success) =&gt; {
              if (error) console.log(error);
              console.log(success);
            }
          );
        });
        resolve();
      });
    };
    promise().then(function() {
      return res.status(200).jsonp({
        message: adminMessages.succ_zone_removed
      });
    });
  }
  </code></pre>
  
  <p>Now the scenario is like when I am trying to delete data it shows success message but data does not get deleted.</p>
  
  <pre><code>  var object = {
      id:this.id,
      zones: this.zonesDelete // Contains list of id
    };
  </code></pre>
  
  <p>I am getting <code>object</code> in a requested body and I want to find the document from a collection and delete the particular array element by finding an id in <code>geoGraphicalFilter.aCoordinates</code> and wants to remove it.</p>