title: How to get treepanel nodes get checked based on server data in extjs?
body: <p>I have a tree panel which is being dynamically generated based on server data. Below is the code to generate tree panel and add it to a form.</p>
  
  <pre><code>Ext.Ajax.request({
      url: '../Get_Menu.php',
      method: 'POST',
      success: function (result, request) {
          var json = result.responseText;
          var temp = Ext.decode(json);
          var obj = {};
          var item = {};
          var menu = {};
          var children = [];
          var module = [{
              "text": "Administrator",
                  "leaf": true,
                  "checked": false,
                  "id": "GROUP_ADMIN",
                  "formBind": true,
                  "name": "GROUP_ADMIN"
          }];
  
          for (var i = 0; i &lt; Object.keys(temp.MENUS).length; i++) {
  
              for (var key in temp.MENUS[i]) {
  
                  for (var n = 0; n &lt; Object.keys(temp.MENUS[i][key]).length; n++) {
  
                      item = {
                          "text": temp.MENUS[i][key][n],
                              "checked": false,
                              "id": key + "_" + temp.MENUS[i][key][n],
                              "name": key + "_" + temp.MENUS[i][key][n],
                              "formBind": true,
                              "leaf": true
                      };
                      children.push(item);
                  }
                  menu = {
                      "text": key,
                          "leaf": false,
                          "id": key,
                          "children": children
                  };
  
                  module.push(menu);
                  children = [];
              }
          }
          obj = {
              "text": "Service Quality",
                  "expanded": true,
                  "formBind": true,
                  "children": module
          };
  
          Ext.getCmp('permissionsTreePanel').setRootNode(obj);
  
      },
      failure: function (result, request) {
          Ext.Msg.alert('Error', 'An Error occured...');
      }
  });
  </code></pre>
  
  <p>I have to check the nodes of tree panel based on server data i am receiving like this:</p>
  
  <pre><code>{"PERMISSIONS":{"GROUP_ADMIN":"false","OPERATIONS_MSU":"true","OPERATIONS_SCHEDULE":"false","OPERATIONS_MARKET_DASHBOARD":"false","OPERATIONS_FE_REFERENCE":"true","PRODUCTION_QUICKQC_VOICE":"false","PRODUCTION_QUICKQC_DATA":"false","PRODUCTION_MARKETQC_VOICE":"false","PRODUCTION_MARKETQC_DATA":"false","PRODUCTION_SURGERY":"false","PRODUCTION_FILE_INVENTORY":"false","PRODUCTION_MARKET_TRACKER":"false","PRODUCTION_DRIVE_ROUTE_TRACKER":"false","PRODUCTION_TICKETS":"false","PRODUCTION_ASSETS":"false","MANAGEMENT_DAILY_STATUS":"false","MANAGEMENT_DAILY_PROCESSING":"false","MANAGEMENT_WEEKLY_WORKFLOW":"false","MANAGEMENT_CUSTOMER_QUESTIONS":"false","MANAGEMENT_KPI_PERFORMANCE_METRICS":"false","MANAGEMENT_COLLECTION_METRICS":"false","MANAGEMENT_OPERATIONS_DASHBOARD":"false","MANAGEMENT_PRODUCTION_DASHBOARD":"false","MANAGEMENT_SUPPORT_DASHBOARD":"false","MANAGEMENT_REVENUE_TRACKER":"false","MANAGEMENT_DEPLOYMENT_TRACKER":"false","SUPPORT_TICKETS":"false","SUPPORT_ASSET_MANAGEMENT":"false","SUPPORT_GENERATE_SHIPMENT":"false","TRAINING_RESOURCES":"false","TRAINING_SCHEDULE":"false"}}
  </code></pre>
  
  <p>The Tree panel:
  <img src="https://i.stack.imgur.com/lr0a2.png" alt="enter image description here"></p>
  
  <p>Please help me in getting tree panel nodes checked through server data.</p>
  
  <p>Help will be appreciated! </p>
  
  <p>Thanks Much :)</p>