score:0

doing the same as below works as expected but the array filter does not.

  var rating0 = data.filter(function(d)
  {
    if (d["IsGoodRating"] == 0)
    {
      return d;
    }
  })
 // var rating0 = data.filter(function(d){ return d.IsGoodRating = 0}); This array filter is not working for some reason
  rating0.forEach(function(d) { console.log(d.IsGoodRating); });

  var rating1 = data.filter(function(d)
  {
    if (d["IsGoodRating"] == 1)
    {
      return d;
    }
  })
 // var rating1 = data.filter(function(d){ return d["IsGoodRating"] != 0});This array filter is not working for some reason
  rating1.forEach(function(d) { console.log(d.IsGoodRating); });

Related Query

More Query from same tag