I have a little bit different from the hint solution where I filter first then map. idk if this is more simple or will be a problem later. I need your opinion! Thank you
const filteredList = watchList.filter(function(watchList) {
return watchList.imdbRating >= 8.0;
}).map(function(watchList) {
return {
title: watchList.Title,
rating: watchList.imdbRating
};
});
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 OPR/82.0.4227.43
Challenge: Use the filter Method to Extract Data from an Array
Link to the challenge: