title: Remove duplicates from array without $unwind
body: <p>Using query aggregation I want to create a new array by a filter of another array, so that the filtered result will be done by a specific field of the preliminary array.
  In this case, I want to filter by the field "<em>fieldName</em>".</p>
  
  <p><strong>I will always want to filter out the last occur</strong></p>
  
  <p>example:
  I have one document:</p>
  
  <pre><code>{
  "fullyQualifiedName" : "MongoDB",
  "items" : [ 
      {
          "fieldName" : "_id",
          "fieldCount" : 7,
          "confidence_level" : 1,
          "fieldClassifications" : [ 
              "LineageGuid"
          ],
      }, 
      {
          "fieldName" : "_id",
          "fieldCount" : 7,
          "fieldClassifications" : [ 
              {
                  "classificationName" : "LineageGuid",
              }
          ]
      }, 
      {
          "fieldName" : "details",
          "fieldCount" : 7,
      }, 
      {
          "fieldName" : "state",
          "fieldCount" : 7,
      }
  ]
  </code></pre>
  
  <p>}</p>
  
  <p>I want to create a new array like:</p>
  
  <pre><code>"items" : [ 
      {
          "fieldName" : "_id",
          "fieldCount" : 7,
          "confidence_level" : 1,
          "fieldClassifications" : [ 
              "LineageGuid"
          ],
      }, 
      {
          "fieldName" : "details",
          "fieldCount" : 7,
      }, 
      {
          "fieldName" : "state",
          "fieldCount" : 7,
      }
  ]
  </code></pre>
  
  <p>The simple solution is to <strong>$unwind</strong> and <strong>$group</strong> again but I can't do it because of performance issue.
  <strong>I am using MongoDB 3.4</strong></p>