Last.fm Web Services » Diskussionen

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?

    • HodgeStar schrieb...
    • Benutzer
    • 5. Jan. 2010, 12:19
    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!

Anonyme Benutzer dürfen keine Beiträge schreiben. Bitte log dich ein oder registriere dich, um Beiträge in den Foren schreiben zu können.