title: Fetch distinct data from mongo array of objects data
body: <p>I need to get the distinct values from multiple mongodb array of objects data.</p>
  
  <pre><code>{
   "_id": ObjectId("5ae2dca33319b21f1289ad38"),
   "NumEntries": NumberLong(3),
   "Data": [
   {
     "Timestamp": "Apr 27 13:42 2018",
     "Client": "Manoj"
   },
   {
     "Timestamp": "Apr 27 13:42 2018",
     "Client": "Rajesh"
   },
   {
     "Timestamp": "Apr 27 13:43 2018",
     "Client": "Manoj"
   }
  ]
  }
  {
  "_id": ObjectId("5ae2dc983319b26f4889ac8a"),
  "NumEntries": NumberLong(1),
  "Data": [
   {
     "Timestamp": "Apr 27 13:42 2018",
     "Client": "Vikas"
   } 
  ]
  }
  </code></pre>
  
  <p>So, I need to find distinct Client Name from this like Manoj, Rajesh &amp; Vikas
  I am using Codeigniter MongoDB libarary. Tried so far:</p>
  
  <pre><code>$uniquemacids = $this-&gt;mongo_db-&gt;distinct('demologs', 'Data.Client');
  </code></pre>
  
  <p>It gives me boolean false / null as response</p>