title: MongoDB: query against value in nested array?
body: <p>I have documents with such kind of schema:</p>
  
  <pre><code>{
     ...
    "coverages" : [
      [
        "GB",
        "WC1"
      ],
      [
        "GB",
        "SE2"
      ],
      ...
    ]
  }
  </code></pre>
  
  <p>I want to find all documents where 'coverages' contains an array second element of which starts with 'WC', i.e. coverages matches with ['GB', /^WC/]. </p>
  
  <p>Is there any way to do it with standard mongodb query language? </p>
  
  <p>I guess it could be easily done with custom JavaScript function, but docs says it's much slower...</p>
  
  <p>Thanks!</p>
  
  <p>P.S.  I'd like to avoid changing the schema.</p>
  
  <p>update: there is relates bug/misfeture in Mongo: <a href="https://jira.mongodb.org/browse/SERVER-1264" rel="nofollow">https://jira.mongodb.org/browse/SERVER-1264</a></p>