I know how that stupid, but i dont understand this simple things.
I have Object, i need get from object names. But don't understand how to get access to inner values.
I try:
data['name']
data[0]
data[0].name
Every time i get this error:
TypeError: Cannot read property
Thanks anyway.
Upd1:
Then i try:
data.constructor
i get this:
Cannot read property 'constructor' of null
I get data from ajax, from this question When i try:
JSON.parse(data)
I get:
SyntaxError: Unexpected token o in JSON at position 1(…)
That raw data when i get this from server:
{"genres":[{"id":28,"name":"Action"},{"id":12,"name":"Adventure"},{"id":16,"name":"Animation"},{"id":35,"name":"Comedy"},{"id":80,"name":"Crime"},{"id":99,"name":"Documentary"},{"id":18,"name":"Drama"},{"id":10751,"name":"Family"},{"id":14,"name":"Fantasy"},{"id":36,"name":"History"},{"id":27,"name":"Horror"},{"id":10402,"name":"Music"},{"id":9648,"name":"Mystery"},{"id":10749,"name":"Romance"},{"id":878,"name":"Science Fiction"},{"id":10770,"name":"TV Movie"},{"id":53,"name":"Thriller"},{"id":10752,"name":"War"},{"id":37,"name":"Western"}]}