Filter Method to Extract Data from Array (Console works, FCC test doesn't)

Hey, I’m trying to figure out why my code works with VS Code running in Chrome console, but not passing FCC tests.

var filteredList, mappedList;
mappedList = => ([{'title': x.Title, 'rating': x.imdbRating}]));

filteredList = mappedList.filter(y => parseFloat(y[0].rating) >= 8.0);

// Add your code above this line


I’ve tried changing simple syntax things in the map() function, by adding parentheses, removing the brackets, etc… but I can’t get it to pass the test. It works in the Chrome console:

NEVERMIND! I just realized I was making an array of an array of objects, instead of just an array of objects. I’ve got it now!

Updated code for any others that make come across the same thing. Removed the “[]” from the map(), and the “[0]” from the filter()

mappedList = => ({'title': x.Title, 'rating': x.imdbRating}));

filteredList = mappedList.filter(y => parseFloat(y.rating) >= 8.0);