title: Bind json data in angularjs checkbox dynamically
body: <p>I would like to bind my array of json data to angularjs checkbox. I am newbiew to this technology so I couldn't figure out the exact way to solve my scenario. I have json data like below</p>
  
  <pre><code>{
  "hits":{
  "total":3695,
  "hits":[
  {
  "_type":"School",
  "_source":{
  "message":[
  "HIGH"
  ],
  "Class":"A"
  }
  },
  {
  "_type":"School",
  "_source":{
  "message":[
  "HIGH"
  ],
  "Class":"B"
  }
  },
  {
  "_type":"School",
  "_source":{
  "message":[
  "HIGH"
  ],
  "Class":"C"
  }
  }
  ]
  }
  }
  </code></pre>
  
  <p>I have to bind the "Class" value in the angularjs checkbox.  </p>
  
  <p>The angularjs code which I have wrote is ,</p>
  
  <pre><code>$scope.listofschoolname = response;
  &lt;label ng-repeat="ModelName in listofschoolname "&gt;
                        &lt;input type="checkbox" ng-model="ModelName.checked"  size="10" /&gt; {{ModelName.hits.hits[0]._source.Class}} 
                    &lt;/label&gt;
  </code></pre>
  
  <p>I can get a single checkbox with value "A". Like that I would like to bind all the value in Class to checkbox.</p>
  
  <p><strong>Note</strong>: The json response which I am getting is dynamic in nature sometimes it have 10 class value(A,B,C,D,E,etc) sometimes it have only one class value(A) based on that my checkbox count and value should change.</p>
  
  <p>Thanks in advance..</p>