title: Switch Statement on Json?
body: <p>I am wondering how do I make a switch statement in json?</p>
  
  <pre><code>{"Errors":{"key1":"afkafk"},"IsValid":false,"SuccessMessage":""}
  </code></pre>
  
  <p>I tried</p>
  
  <pre><code>switch(response)
  {
     case response.Errors.key1:
      alert('test');
     default: 
  }
  </code></pre>
  
  <p>But it seems to ignore my first case.</p>
  
  <p><strong>Edit</strong></p>
  
  <pre><code>// if undefined then go to next if statement - I am not sure if I can do something 
  // like !=== null
  if (response.Errors.key1)
              {
                 // display value of key1 
              }
  else if(response.Errors.Key2)
  {
     // display value of key2 differently
  }
  </code></pre>
  
  <p>So that is what I am trying to do just with a switch statement.</p>