title: MongoDB Length of String or need help in mongoDB mapReduce query
body: <p>I need some guidence in a query for mongodb.  I have a collection of items which contain an array that contains multiple fields, but I only care about one field, which is the barcode field.  I need to distiguish the length of the barcode string.</p>
  
  <pre><code>Items.find({this.array['barcode'].length &gt; 6})  
  </code></pre>
  
  <p>It would be great if the above query was possible, but I believe that it's not.  I only need a list of barcodes.  How do I go about solving this problem?  Does mongodb have something to compare length of a string?  Or do I have to use a mapReduce query?  If I do could I have some guidence on that?  I'm not sure how I would go about writing it.<br>
  Thank you</p>