I need help parsing the friendsList
object returned by [below] into JavaScript.
FB.api('me/friends', function(response) {});
I want to parse "response" into an array
I tried response.forEach ...
I got:
Uncaught TypeError: friendsObject.forEach is not a function
So I thought I could just do JSON.parse(response);
that also gave me an error.
Then I tried to print out with console.log(response)
as it gives me an Object.
I am super confused why the object cant turn into an array, wont parse but prints the entire object when I console.log it.
How do I parse that object into a javascript array?