title: How to load the JSON data into the Jqgrid?
body: <p>I use the following way to load the data into the jqgrid.I cant able to load the <strong>json data</strong> into the jqgrid.So i parse the json to array like <strong>mydata=json.parse(jsondata)</strong>.Then i bind this <strong><em>array(mydata)</em></strong> into jqgrid using <strong>datatype: "local"</strong>.my question is <strong>How to bind the json data into the jqgrid?</strong> </p>
  
  <pre><code>         $("#datagrid").jqGrid({
  
                      datatype: "local", 
                      data: mydata,
                      colNames:['companyid','company', 'price', 'Change','perchange','LastUpdated'],
                      colModel:[
                          {name:'companyid',index:'companyid', width:100,editable:true,editoptions:{size:10}},
                          {name:'company',index:'company', width:100,editable:true},
                          {name:'price',index:'price', width:100,editable:true,editoptions:{size:10}},
                          {name:'Change',index:'Change', width:100,editable:true,editoptions:{size:25}},
                          {name:'perchange',index:'perchange', width:100, align:"right",editable:true,editoptions:{size:10}},
                          {name:'LastUpdated',index:'LastUpdated', width:200, align:"right",editable:true,editoptions:{size:10}}
                      ],
                      rowNum:10,
                      rowList:[3,6],
                      loadonce: true,
                      pager: '#navGrid',
                      sortname: 'companyid',
                      sortorder: "asc", 
                      height: 210,
                      width:600,
                      onSelectRow: function(id)
                                   {
                                      getID = jQuery("#datagrid").jqGrid('getCell', id, 'companyid')
                                   },
                      viewrecords: true,
                      caption:"JQ GRID"
                  }); 
  </code></pre>
  
  <p>JSON format:</p>
  
  <pre><code>    [
          {
              "company": "test",
              "price": 98,
              "Change": 8,
              "perchange": 8,
              "LastUpdated": "2",
              "companyid": 2
          },
          {
              "company": "test123",
              "price": 1,
              "Change": 1,
              "perchange": 1,
              "LastUpdated": "1",
              "companyid": 3
          },
          {
              "company": "abc",
              "price": 1234,
              "Change": 123,
              "perchange": 1,
              "LastUpdated": "1",
              "companyid": 1
          }
      ]
  </code></pre>