title: removing duplicate array values from mongodb
body: <p>In mongodb I have collection where arrays has duplicate entries like</p>
  
  <pre><code>{
      "_id": ObjectId("57cf3cdd5f20a3b0ba009777"),
      "Chat": 6,
      "string": [
          "1348157031 Riyadh",
          " 548275320 Mohammad Sumon",
          " 1348157031 Riyadh",
          " 548275320 Mohammad Sumon",
          " 1348157031 Riyadh",
          " 1348157031 Riyadh"
      ]
  }
  </code></pre>
  
  <p>I need to remove duplicate arrays and keep only unique array values like below. </p>
  
  <pre><code>{
      "_id": ObjectId("57cf3cdd5f20a3b0ba009777"),
      "Chat": 6,
      "string": [
          "1348157031 Riyadh",
          " 548275320 Mohammad Sumon",
      ]
  }
  </code></pre>
  
  <p>what would be the best way to do this</p>
  
  <p>thanks</p>