I am trying to loop through each value in my dictionary and then go out and get another dictionary based on one of the objects in the first dictionary through each loop iteration:
var dAlbumPhotos = {}; // holds a list of photo objects
var dAlbumsAndPhotos = {}; // will hold all the album | dAlbumPhotos for each album
for(var a in dAlbums)
{
dAlbumPhotos = GetPhotosForAlbum(userID, accessToken, a.id);
dAlbumsAndPhotos(a) = dAlbumPhotos;
}
I’m not quite sure how to do this without an index. I need to increment through the dAlbumPhotos and append to the final dictionary that album and it’s dAlbumPhotos
It looks like you’re really using an Associative Array in Javascript so you should be able to change the last bit of your code to be: