+1 vote
ago by

I have a beef, explain RV-hundred anyone why the result is undefined:

Have the response in Json format and object with other objects, trying to access one of them:

var next = responce.n;

- get undefined

If you attempt to do so:

var next = 'a1';

- get what you need!

check responce.next:


all as you need is kept here just a1

Live example

What is my mistake?
ago by
Ilya Shatokhin behold, the most simple example: https://jsfiddle.net/83t6647x/13/
ago by
Arthur Selivanov anyway without an example it is not clear. Show me in pastebin or here a non-working piece of code that can be repeated.
ago by
Ilya Shatokhin : Yes there is the usual returns in the ajax success: function (responce) { ... }, the contents of the response object - n: "A1" , to work with him without problems, but when I try to substitute when referring to the object element, you get undefined (
ago by
Need an example of code line by line and even telepaths will not help.

1 Answer

0 votes
ago by
Best answer
You have one example of "a" in Cyrillic and the other Latin. Looks the same, but in fact not the same.