{"size": 922, "ext": "js", "max_stars_repo_path": "StarterCode/static/js/app.js", "max_stars_repo_name": "atusan/javascript-challenge", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "StarterCode/static/js/app.js", "max_issues_repo_name": "atusan/javascript-challenge", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "StarterCode/static/js/app.js", "max_forks_repo_name": "atusan/javascript-challenge", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.9189189189, "max_line_length": 86, "alphanum_fraction": 0.5780911063}
// from data.js
var tableData = data;

// YOUR CODE HERE!
var tbody = d3.select("tbody")

//fill the table with data
tableData.forEach((cityInfo) => {
    var row = tbody.append("tr");
    Object.entries(cityInfo).forEach(([key, value]) => {
      var cell = row.append("td");
      cell.text(value);
    });
  });

  var button = d3.select("#filter-btn");
  

  button.on("click",function(){
      var inputElement = d3.select("#datetime");
      var inputValue = inputElement.property("value");;
    //   console.log(inputValue)
      var filteredData = tableData.filter(cityInfo => cityInfo.datetime===inputValue);
      console.log(filteredData);
      tbody.html("");
      filteredData.forEach((cityInfo) => {
          var row = tbody.append("tr");
          Object.entries(cityInfo).forEach(([key, value]) => {
          var cell = row.append("td");
          cell.text(value);
          });
       });

  });


  