title: Codeigniter with MongoDB sub array
body: <p>I have below type of collection in mongodb:</p>
  
  <pre><code>Array
  (
  [_id] =&gt; 4fcf383a5990581c0b000015
  [user_id] =&gt; 1
  [username] =&gt; admin
  [password] =&gt; 21232f297a57a5a743894a0e4a801fc3
  [first_name] =&gt; admin
  [last_name] =&gt; admin
  [address] =&gt; 
  [address_2] =&gt; 
   [deshboard_report] =&gt; Array
      (
          [0] =&gt; Array
              (
                  [report_ids] =&gt; 1
                  [rpt_color] =&gt; color-red
                  [rpt_status] =&gt; max
                  [report_title] =&gt; Last Point
                  [report_file] =&gt; last_location
              )
          [1] =&gt; Array
              (
                  [report_ids] =&gt; 2
                  [rpt_color] =&gt; color-green
                  [rpt_status] =&gt; max
                  [report_title] =&gt; Inactive Device
                  [report_file] =&gt; inactive_devices
              )
      )
  )
  </code></pre>
  
  <p>I want to search in <code>report_ids</code> and that search return sub array of <code>deshboard_report</code> how it is possible?</p>
  
  <p>I use this library to connect: <a href="https://github.com/alexbilbie/codeigniter-mongodb-library" rel="nofollow">https://github.com/alexbilbie/codeigniter-mongodb-library</a></p>