title: String field value length in array in mongoDB
body: <p>How can I get the length of characters from a field that is nested in another field? and it is in an array. eg:</p>
  
  <pre><code>{
      "_id" : ObjectId("687e1db"),
      "content" : {
          "ods" : "1102223000241",
          "startDate" : ISODate("2017-05-11T12:00:00Z"),
          "classes" : [
              {
                "driveNumber" : "9999078900007091",
                "number" : "00107605829357",
                "sId" : "0000000005009593"
              }
          ],
           "user" : "SoftLogic",
      },
      "level" : 2
  }
  </code></pre>
  
  <p>and I want to get a sample in the <code>content.classes.number</code>, where there are more than 16 characters in the field.</p>
  
  <p>when making a request I was guided by <a href="https://stackoverflow.com/questions/29577713/string-field-value-length-in-mongodb">String field value length in mongoDB</a></p>
  
  <p>Either this request is not suitable for this situation, or I am doing something wrong.</p>
  
  <pre><code>db.Basis.find({
      "content.classes.number": { "$exists": true }, 
      "$expr": { "$gt": [ { "$strLenCP": "$content.classes.number" }, 16 ] }})
  </code></pre>
  
  <p>I get the error: <a href="https://gyazo.com/d2849406d36364de94d6ea89eff1c2b6" rel="nofollow noreferrer">https://gyazo.com/d2849406d36364de94d6ea89eff1c2b6</a></p>
  
  <p>I tried not only such options.</p>
  
  <p>UPD mongo version 3.4.3</p>