title: How do I select specific tags from a data set?
body: <p>I'm doing a project for uni and I'm a bit of a coding noob. I'm wanting to have 3 buttons on a page, which all connect to one js dataset. I want each button to only show specific information from the data. For example - the data references different businesses in Melbourne that provide printing services. I want each button to be a different service i.e general printing, binding, photography. Can someone please help this poor soul? ps: sorry if my technical language is terrible.
  This is what I currently have;</p>
  
  
  
  <pre><code>    &lt;script type="text/javascript"&gt;
  
      window.onload = function(){
      populateData();
      }
  
      function populateData(){
      var table = document.getElementById("DATA");//get &lt;table&gt;
      table.innerHTML = ""//make blank
      table.innerHTML = "&lt;tr&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Address&lt;/th&gt;&lt;th&gt;URL&lt;/th&gt;&lt;/tr&gt;";//add table headers
  
      for(i = 0; i &lt; plData.length; i++){
  
          var tableRow = document.createElement("tr");//make &lt;tr&gt;
  
  
          tableRow.className = plData[i].plTags("printing");//apply printer linker category as class name
  
          tableRow.innerHTML += "&lt;td&gt;" +  plData[i].plName + "&lt;/td&gt;&lt;td&gt;"+ plData[i].plStreet + " " + plData[i].plCity + " " + plData[i].plRegion + " " + plData[i].plPostcode + "&lt;/td&gt;&lt;td&gt;&lt;a href='" + plData[i].plHyperlink + "'&gt;" + plData[i].plHyperlink + "&lt;/a&gt;&lt;/td&gt;";//add HTML to &lt;tr&gt;
          table.appendChild(tableRow);
      }
  
  }
  </code></pre>