title: How to load Json array into a Dropdown using reactjs/jquery
body: <p>I am trying to load a json file data which full names(Branch names from git).
   I want to load it all into a Dropdown menu, I also want it to be clickable so that I can run another node script once I click on the name.
  How can I achieve this in reactjs/jquery(either)? I am very new to coding below is all I have done so far.. please help!</p>
  
  <pre><code>&lt;select id="users-dropdown" style="width:200px; display:block;"&gt;&lt;/select&gt;
  
          &lt;script&gt;        
  
          function buildUserList(){
              console.log(branchData)
                     for (var i=0;i&lt;branchData.length;i++){
                 var branchesDropdown = document.getElementById('users-dropdown');
                  branchesDropdown options[branchesDropdown.options.length] = new Option(branchData[i].all);
              }
  
          }
          var my_url = 'branches.json';
          var branchData;
          var json = (function () {
              var json = null;
              $.ajax({
                  'async': false,
                  'global': false,
                  'url': my_url,
                  'dataType': 'json',
                  'success':
                  // function (data) {
                      branchData = data.all;
                      buildUserList();
                  }
              });
              return json;
          })(); 
          &lt;/script&gt;
  </code></pre>
  
  <p>Here is my json data: Branches.json</p>
  
  <pre><code>["master","remotes/origin/1.1","remotes/origin/13.10","remotes/origin/13.11"]
  </code></pre>