title: Handling somewhat complex JSON data with jQuery Templates
body: <p>I'm not a JS expert but I've been given a JSON model to display using jQuery, and have my hopes up for jQuery Templates. However all the documentation examples seem to be for simple 2-level arrays, and I can't translate these examples to the JSON I have. I'm not clear on whether I should be working with <strong>jQuery.tmpl()</strong>, or <strong>{{each}}</strong> or <strong>{{tmpl}}</strong> or <strong>{{wrap}}</strong> to iterate through this data.</p>
  
  <p>I need to acquire the JSON below and display each "host" name followed by its "states" details (CPU, Disk, Mem.) Any hints on how to proceed are much appreciated.</p>
  
  <pre><code>{"health":64,
  "hosts":[
          {
          "name":"Windows2000P",
          "states":[
              {"name":"CPU","link":"(html link)","bgcolor":"#CC99CC"},
              {"name":"Disk","link":"(html link)","bgcolor":"#CC99CC"},
              {"name":"Mem","link":"(html link)","bgcolor":"#CC99CC"}
              ]
          },
          {
          "name":"Windows2003",
          "states":[
              {"name":"CPU","link":"(html link)","bgcolor":"#98FB98"},
              {"name":"Disk","link":"(html link)","bgcolor":"#98FB98"},
              {"name":"Mem","link":"(html link)","bgcolor":"#F08080"}
              ]
          },
          {
          "name":"Windows7",
          "states":[
              {"name":"CPU","link":"(html link)","bgcolor":"#98FB98"},
              {"name":"Disk","link":"(html link)","bgcolor":"#98FB98"},
              {"name":"Mem","link":"(html link)","bgcolor":"#F08080"}
              ]
          }
      ]
  }
  </code></pre>