This question has already been answered:
- Turn objects with links into JSON 3 responses
I have an associative array (object) selectedData
When trying to convert it to JSON like this:
myJson = JSON.stringify(selectedData[0]);
or
myJson = JSON.stringify(selectedData[1]);
and so on, then everything is OK.
But if I need to convert all the elements of an array:
myJson = JSON.stringify(selectedData);
Then I get the error:
Uncaught TypeError: Converting circular structure to JSON
How can I convert a two-dimensional associative array into JSON without this error?
arr[0]=arr
that has no end to any edge - Alexander Lonberg pm