Question about "filter Method" javascript challenge

The challenge I’m talking about is this one:

and i already completed the challenge, which deleted my successful solution, but the hint solution causes the same issue

var filteredList = watchList.map(function(e) {
  return {title: e["Title"], rating: e["imdbRating"]}
}).filter((e) => e.rating >= 8);

Anyway, when I use console.log to try to see my solution, instead of showing the actual data it just shows (literally)

[object Object],[object Object],[object Object],[object Object]

This isn’t a huuuuge problem since the challenge still successfully submits if I have the right answer, but it does make testing solutions a bit harder since I can’t actually see what they’re outputting. Is there a good way to fix this? Or am I stuck just blindly hoping I’ll stumble on the solution?

Use browser console (F12 -> console, or Ctrl+Shift+j in chrome).

Or if you definitely want to use FCC’s console you could wrap your objects in JSON.stringify():

console.log(JSON.stringify(filteredList));
1 Like

Ok awesome thank you! Great timing, as I just got to the next one of the challenges this advice applies to. Thank you so much.