an array of server:
Array ( [28.01.2015] => Array ( [03] => 2 [02] => 4 ) )
was converted into a string using the json_encode.
The result was a string:
{"28.01.2015":{"03":2,"02":4}}
How to use Javascript to convert this string into an array ?
an array of server:
Array ( [28.01.2015] => Array ( [03] => 2 [02] => 4 ) )
was converted into a string using the json_encode.
The result was a string:
{"28.01.2015":{"03":2,"02":4}}
How to use Javascript to convert this string into an array ?
JSON.parse('{"28.01.2015":{"03":2,"02":4}}');
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse
You can turn that into a JavaScript object by using JSON.parse():
var my_object = JSON.parse('{"28.01.2015":{"03":2,"02":4}}');
For achieve this, you need use JSON.parse.
JSON.parse('{"28.01.2015":{"03":2,"02":4}}');
Or you could organize better:
var string = '{"28.01.2015":{"03":2,"02":4}}';
var object = JSON.parse(string);