title: Aggregate Switch Case Syntax with Multiple Conditions
body: <p>I'm trying to do a simple switch case in Mongo, but keep getting syntax error messages</p>
  
  <pre><code>db.users.aggregate([
    { $project: {
      "age": 1,
      "Age Group":{
        $switch:{
          branches:[
            {
              case: {$lte:[{"age": "18"}]},
                      then: "Minor"
            },
            {
              case: {$gt:[{"age": "18"}]},
                    {$lte:[{"age": "30"}]},
              then: "Young Adult"
            }
          ],
          default: "No Age Group"
        }
      }
    }}        
  ])
  </code></pre>
  
  <p>Can anyone help please?</p>