title: Merge two array fields in mongoDB
body: <p>I have a collection of the following structure</p>
  
  <pre><code>{
     _id : ObjectId("52f0795a58c5061aa34d436a"),
     "attribute1" : [1, 3, 6, 7],
     "attribute2" : [2, 4, 6, 8]
  }
  </code></pre>
  
  <p>Is there any way I can merge the two attributes while removing duplicates using aggregation query in mongoDB? I need the result to be like this:</p>
  
  <pre><code>{
     _id : ObjectId("52f0795a58c5061aa34d436a"),
     "attribute3" : [1, 3, 6, 7, 2, 4, 8]
  }
  </code></pre>