Last.fm seems to put #
symbols in front of some of their variable names for it's JSON API. Have a look at a sample response here. As soon as I try and access #text
with JavaScript I get an invalid symbol error in the console. Any quick fixes or reasons for this hash?
jQuery is only used to retrieve the data. Accessing the #text
data is done through straight JavaScript syntax, something like data.recenttracks.track.artist["#text"]
You can't do artist.#text
, because #
is an invalid first character symbol to be used for accessing an object member. Use the square brackets instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With