jQuery - parsing JSON data - Having trouble with variable name

前端 未结 3 1695
耶瑟儿~
耶瑟儿~ 2021-02-09 17:10

My first delve into working with JSON data. I have a bit of experience using jQuery though.

I\'m posting to this URL (tumblr api): jyoseph.com/api/read/json

What

3条回答
  •  爱一瞬间的悲伤
    2021-02-09 18:12

    If there are dashes in the names you'll need to access them differently. Change var photo500 = this.photo-url-500; to read var photo500 = this["photo-url-500"];.

提交回复
热议问题