title: Can I check for object properties in a switch statement?
body: <p>I am trying to process a range of possible responses from an AJAX request and want to do this in a switch statement.</p>
  
  <p><code>data.message</code> holds the information I'm interested in, however it can be returned as either a string or a JSON object</p>
  
  <p>Testing for a string is simple enough, but I want to know if I can do something like this:</p>
  
  <pre><code>switch (data.message) {
      case 'ok':
          ...
      case 'another string':
          ...
      case (this.id == 123):
          ...
  }
  </code></pre>