Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6597531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:13:17+00:00 2026-05-25T18:13:17+00:00

I am trying to create a very basic Flickr gallery using the Flickr API.

  • 0

I am trying to create a very basic Flickr gallery using the Flickr API. What I want to achieve is sorting my pictures by tag. What I am using is jQuery.getJSON() so that I can parse the API response of flickr.photosets.getPhotos.

The data I am interested in getting from Flickr is the tag and the URL associated to each photo. The problem with this is that the only logical way out of this for me is creating a multidimensional array of the following format:

Array['tag1'] => ['URL_1', 'URL_2', 'URL_3', 'URL_n'];

However, I cannot find any way to achieve this. My code looks like this:

$.getJSON('http://api.flickr.com/services/rest/?api_key=xxx&method=flickr.photosets.getPhotos&user_id=xxx&format=json&extras=tags%2C+url_l%2C+url_sq&nojsoncallback=1&photoset_id=xxx', 
   function(data) {

     var imageArray = [];   
     $.each(data.photoset.photo, function(i, item) {

       imageArray[item.tags] = [item.url_sq,];

     });
});

I am aware that the code might look awkward, but I’ve tried everything and there’s no way I can figure this out.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:13:18+00:00Added an answer on May 25, 2026 at 6:13 pm
    var arr = [];
    arr[0] = [];
    arr[0][0] = [];
    arr[0][0][0] = "3 dimentional array"
    

    Multi dimentional arrays have a lot of gaps unless they are used properly. A two dimensional array is called a matrix.

    I believe your data contains a space seperate string called “tags” containing the tags and a single url.

    var tagObject = {};
    data.photoset.photo.forEach(function(val) {
      val.tags.split(" ").forEach(function(tag) {
        if (!tagObject[tag]) {
          tagObject[tag] = [];
        }
        tagObject[tag].push(val.url_sq);
      });
    });
    console.log(tagObject); 
    /*
      {
        "sea": ["url1", "url2", ...],
        "things": ["url4", ...],
        ...
      }
    */
    

    I don’t know how it returns multiple tags.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a very basic Setup and Deployment project using Visual Studio.
I am trying to create a very basic flash game, using Tom Krcha's P2P
I'm trying to create a very basic web project called web using MyEclipse and
I'm trying to create a very simple chat application in Flex/.Net using FluorineFX but
I'm trying to create a DOJO DataGrid populated using a dojo.data.ItemFileReadStore with very simple
I'm playing around with a little jquery animation and trying to achieve a very
I'm trying to do a very basic jquery tutorial but I'm not able to
I'm trying to create a very basic chat system, part of which will be
I'm currently trying to create a very basic job scheduler. I'm trying to create
I am trying to create a very basic MVC framework to better understand the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.