Use the map Method to Extract Data from an Array - [object Object]

Use the map Method to Extract Data from an Array - [object Object]
0

#1

Hi everyone! Sorry if this has been posted before but although there are questions about the same challenge, I couldn’t find a similar problem

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array/

In this challenge my code:

var rating = watchList.map( (movie) => ({"Title": movie["Title"], "Rating": movie["imdbRating"] }));

gives the answer:

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

I couldn’t understand why, I’ve tried many other codes and the console is always the same

Thanks for your time :slight_smile:


#2

You are creating a map of objects, the console is just showing you what it is. If you look in the browser console you should be able to look at each object in detail