Map method to extract data from array

Map method to extract data from array

let rating = => ({"title" :item["Title"], "rating": item["imdbRating"]}));
if we do console.log (rating) we get output as [object Object] so on and so forth. Why am i not able to get desired output?

Please follow the link for the challenge, it was not getting posted conventionally.

Just copy pasted your code and it passed all tests.

It passes the test , true, but I am not able to understand why we are not seeing the desired output .

It is the correct output, but since the FCC console can’t display full objects because it transforms the output to a string representation; the toString() output of an object is [object Object]. Raw console output looks like this:


1 Like