Last.fm Web Services » Discussions

Cannot access image using json::geo.getEvents

 
  • Cannot access image using json::geo.getEvents

    The object returned from getEvents contains images but i cannot access the url.

    The image is stored in an object with #text and size but since # is an invalid character i cannot access the url.

    This is how I would like to access the url: data.events.event[0].image[2].#text

    I suppose I have misunderstood something?

  • Looking more into it this is true for all images. I cannot be the first person to try to access images in a json response? The image object contains #text and size and I cannot access the #text property.

    What am I doing wrong?

  • you're not the first. something like data.events.event[0].image[2]["#text"] should work.

  • Thank you! That works perfectly!

  • thanks

    that worked for me as well!

Anonymous users may not post messages. Please log in or create an account to post in the forums.