Help: Use the filter Method to Extract Data from an Array

Hi. I’m at a loss why my solution is being blocked, or not producing the result expected:

var watchList = [
//the list with movies and ratings
];
var filteredList = watchList.map((item) =>({"Title": item["Title"], "Rating": item["imdbRating"]})).filter((e) => e.Rating >= 8);

Inspecting this code with Chrome’s console shows correct output. Yet this doesn’t pass, and I don’t get why that is. As far as I understand this should be functionally the same as the example solution, only with both map and filter written as arrow functions.

My Apologies. I had a capitalization in property names that i didn’t notice. now it works.

1 Like