title: How can I set different class for div cheking the json data
body: <p>How can I check true or false from json and put different css for div if true or false:</p>
  
  <p>For example json:</p>
  
  <pre><code>{
      "Object": [
      {
          "test": true,
          "number": "001"
      }, {
          "test": false,
          "number": "002"
      }, {
          "test": false,
          "number": "003"
      }, {
          "test": true,
          "number": "004"
      }]
  }
  </code></pre>
  
  <p>and i created html:</p>
  
  <pre><code>&lt;div class="test" id="001"&gt;001&lt;/div&gt;
  &lt;div class="test" id="002"&gt;002&lt;/div&gt;
  &lt;div class="test" id="003"&gt;003&lt;/div&gt;
  &lt;div class="test" id="004"&gt;004&lt;/div&gt;
  </code></pre>
  
  <p>I tried something like this but it is wrong...</p>
  
  <pre><code>if (test == 'true') {
  $(".test").css("background-color", "blue");
  } else {
  $(".test").css("background-color", "red");
  }
  </code></pre>