Hello All,
I'm trying to loop through my JSON array and assign a specific key of each element into a variable:
Here is the array:
"joining_profiles": [
{
"pic": "http://graph.facebook.com/832332325303/picture",
"id": 3,
"name": "Test2 Gmail"
},
{
"pic": "http://graph.facebook.com/620223232354388/picture",
"id": 81,
"name": "Lawson G."
},
{
"pic": "http://graph.facebook.com/6693273223239/picture",
"id": 83,
"name": "Mark Zuckerberg"
}
]
Here is my javascript:
for (var q = 0; q < pings[i].joining_profiles.length; q++) {
var joiners = pings[i].joining_profiles[q].name;
joiners.join();
Basically I need to assign each "name" entry into a joined variable separated by a comma to use in a closured function.
The error im getting from the console is:
TypeError: Result of expression 'joiners.join' [undefined] is not a function.