title: Appending json file to html with condition
body: <p>I am appending a dynamic json file to html.I would like to change the color of openticket row .td elements if value of .openticket is bigger then x number.</p>
  
  <p>My code looks like:</p>
  
  <pre><code>&lt;table id="userdata" border="2"&gt;
     &lt;thead&gt;
        &lt;th&gt;Department&lt;/th&gt;
        &lt;th&gt;OpenTickets&lt;/th&gt;
     &lt;/thead&gt;
     &lt;tbody&gt;&lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>function repopulateTable(data) {
      var parsedData = JSON.parse(data);
      console.log(parsedData);
      var dashboard = [];
      dashboard.push(JSON.parse(data));
      dashboard.forEach(function (value, index) {;
          var table1Rows = "";
          for (var key in value) {
              if (value.hasOwnProperty(key)) {
                  if (key === 'Item1') {
                      value[key].forEach(function (val) {                                
                          var tbl1Row = "&lt;tr&gt;" + "&lt;td&gt;" + val.Title + "&lt;/td&gt;" + "&lt;td&gt;" + val.Ticketnumber + "&lt;/td&gt;" + "&lt;/tr&gt;"
                          table1Rows += tbl1Row;
                      })
                  }
              }
          }
          $("#userdata tbody").html(table1Rows);
      });
  }
  </code></pre>
  
  <p>I have made css</p>
  
  <pre><code>.color{
     color:red;
  }
  </code></pre>
  
  <p>and tried captured the val like and add attribute:</p>
  
  <pre><code>var capture = $(val.Ticketnumber).val();
  if (capture.val)&gt;3{
  $("td:second").addClass("color");
  }
  </code></pre>
  
  <p>without success.</p>