Question

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.l(results.entry[0].media:content.property)

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

Was it helpful?

Solution

Something like this:

results.entry[0]["media:content"].property
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top