I think that’s passing in an object as the arguments and returning just the property values (leaving off the key).
So the callback function inside map() expects something that looks like this {Title: title, imdbRating: rating} and builds up an array of things that look like this: {title, rating}
that’s not an array, it’s an object, but if you put a variable inside an object, you will get a key-value pair with key equal the name of thr variable and value equal to value of the variable
What does the argument {Title: title, imdbRating: rating} mean?
Is it assigning Title & imdbRating values to title & rating for each instance? If so, how am I getting this as the output?
[{"title":"Inception","rating":"8.8"},{"title":"Interstellar","rating":"8.6"},{"title":"The Dark Knight","rating":"9.0"},{"title":"Batman Begins","rating":"8.3"},{"title":"Avatar","rating":"7.9"}]
I mean how am I getting the paired values like this : {"title":"Inception", "rating":"8.8"}