title: Switch case is not working in Reactjs
body: <p>I have a json and I'm trying to display a form using the json data. I tried to display the indexes using the Switch case, so based on the html control type the index will be displayed. Below is my code</p>
  
  <pre><code>var React = require('react');
  var ReactDOM = require('react-dom');
  
  var DATA = {
  "indexList": [{
          "Label": "Name",
          "Type": "text",
          "Regex": "",
          "Default_Val": "",
          "Values": {
              "Key": "",
              "Value": ""
          },
          "Validtion Msg": "",
          "Script": "",
          "Mandatory": "required",
          "maxLength":"16",
          "minLength":"7",
          "format":"Alphanumeric",
          "cssClassName": "form-control",
          "Placeholder": ""
      },
      {
          "Label": "Select Language",
          "Type": "dropdown",
          "Regex": "",
          "Default_Val": "English",
          "Values": [{
              "Key": "option1",
              "Value": "English"
          },{
              "Key": "option2",
              "Value": "Spanish"
          }],
          "Validtion Msg": "",
          "Script": "",
          "Mandatory": "Y",
          "maxLength":"",
          "minLength":"",
          "format":"",
          "cssClassName": "form-control",
          "Placeholder": ""
      },
  
      {
          "Label": "Type",
          "Field_Type": "radio",
          "Regex": "",
          "Default_Val": "",
          "Values": [{
              "Key": "option1",
              "Value": "Form1"
          }, {
              "Key": "option2",
              "Value": "Form2"
          }, {
              "Key": "option3",
              "Value": "Form3"
          },{
              "Key": "option4",
              "Value": "Form4"
          },{
              "Key": "option5",
              "Value": "Form5"
          }],
          "Validtion Msg": "",
          "Script": "",
          "Mandatory": "Y",
          "maxLength":"",
          "minLength":"",
          "format":"",
          "cssClassName": "form-control",
          "Placeholder": ""
      }
  ]
  };
  
  var Menu = React.createClass({
  
  renderForm: function () {
  
      var data = DATA.indexList;
      console.log(data);
      return data.map(group =&gt;{
          return &lt;div&gt;
                  &lt;label for={group.Label}&gt;{group.Label}&lt;/label&gt;
                  &lt;div&gt;
                      switch(group.Type) {
                          case 'text':
                          return &lt;input className={group.cssClassName} 
                                        id={group.Label} 
                                        placeholder={group.Placeholder}
                                        {group.Mandatory}/&gt;
  
                          case 'dropdown':
                          return &lt;select className={group.cssClassName}&gt;
                                      &lt;option value=""&gt;{group.Placeholder}&lt;/option&gt;
                                      &lt;option for="let values of group.Values.value"&gt;{values}&lt;/option&gt;
                                  &lt;/select&gt;
  
  
                          case 'radio':
                          return &lt;div className={group.Type}&gt;
                                      &lt;div for="let value of group.Values"&gt;
                                          &lt;label&gt;&lt;input
                                          name="radios"/&gt;{value}&lt;/label&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
  
                          case 'chekbox'
                          return &lt;div className={group.Type}&gt;
                                      &lt;div for="let value of group.Values"&gt;
                                          &lt;label&gt;&lt;input name="checkbox"/&gt;{value}&lt;/label&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                      }
                  &lt;/div&gt;
                 &lt;/div&gt;
      });
  },
  
  render: function() {
      return (    
          &lt;div className="container"&gt;
              &lt;br/&gt;
              &lt;div className="panel panel-primary"&gt;
                  &lt;div className="panel-heading"&gt;Form&lt;/div&gt;
                      &lt;div className="panel-body"&gt;
                          &lt;form&gt;
                              &lt;div className="form-group"&gt;
                                  &lt;div className="col-xs-5"&gt;
                                      {this.renderForm()}
                                      &lt;button type="button" className="btn btn-primary"&gt;Submit&lt;/button&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/form&gt;
                      &lt;/div&gt;      
              &lt;/div&gt;
          &lt;/div&gt;
  )}
  });
  
  module.exports = Menu
  </code></pre>
  
  <p>With the above code Im getting an error "Unexpexcted token" and the error is pointing towards the "case". Can anyone help to resolve the issue, Im new to react and Im not able to resolve this issue. Any syntax error in the code?</p>