开发者

JSON - Parsing quick help (object name)

开发者 https://www.devze.com 2023-01-31 02:41 出处:网络
Parsing some JSON and one [edit: +\"of the\"] names for an object is \"media:content\". Say I just want to quickly console.log this by,

Parsing some JSON and one [edit: +"of the"] names for an object is "media:content".

Say I just want to quickly console.log this by,

c开发者_StackOverflow.l(results.entry[0].media:content.property)

how must I format that object name so it doesn't throw me a syntax error?


Something like this:

results.entry[0]["media:content"].property
0

精彩评论

暂无评论...
验证码 换一张
取 消