Многомерный массив в json
В PHP создаю многомерный массив
Array ( [0] => Array ( [tserv] => 1 [descripthion] => Ртоговый отчёт [server_name] => 127.0.0.1 [login] => sa [password] => 202cb962ac59075b964b07152d234b70 [report] => Array ( [0] => Array ( [id_namerep] => 1 [page_Qury] => report\getdata.php [description] => # [column] => Array ( [0] => Array ( [name] => id [description] => # [show] => 1 [width] => 50 [align] => left ) [1] => Array ( [name] => surname [description] => РРјСЏ [show] => 1 [width] => 50 [align] => left ) [2] => Array ( [name] => fname [description] => Фамилия [show] => 1 [width] => 50 [align] => left ) [3] => Array ( [name] => lname [description] => Отчество [show] => 1 [width] => 50 [align] => left ) ) ) [1] => Array ( [id_namerep] => 2 [page_Qury] => report\getdata.php [description] => # [column] => Array ( [0] => Array ( [name] => id [description] => # [show] => 1 [width] => 50 [align] => left ) [1] => Array ( [name] => surname [description] => РРјСЏ [show] => 1 [width] => 50 [align] => left ) [2] => Array ( [name] => fname [description] => Фамилия [show] => 1 [width] => 50 [align] => left ) [3] => Array ( [name] => lname [description] => Отчество [show] => 1 [width] => 50 [align] => left ) ) ) [2] => Array ( [id_namerep] => 3 [page_Qury] => report\getdata.php [description] => # [column] => Array ( [0] => Array ( [name] => id [description] => # [show] => 1 [width] => 50 [align] => left ) [1] => Array ( [name] => surname [description] => РРјСЏ [show] => 1 [width] => 50 [align] => left ) [2] => Array ( [name] => fname [description] => Фамилия [show] => 1 [width] => 50 [align] => left ) [3] => Array ( [name] => lname [description] => Отчество [show] => 1 [width] => 50 [align] => left ) ) ) [3] => Array ( [id_namerep] => 4 [page_Qury] => report\getdata.php [description] => # [column] => Array ( [0] => Array ( [name] => id [description] => # [show] => 1 [width] => 50 [align] => left ) [1] => Array ( [name] => surname [description] => РРјСЏ [show] => 1 [width] => 50 [align] => left ) [2] => Array ( [name] => fname [description] => Фамилия [show] => 1 [width] => 50 [align] => left ) [3] => Array ( [name] => lname [description] => Отчество [show] => 1 [width] => 50 [align] => left ) ) ) ) ) )
Запихиваю его в JSON получается следующее
{"row":[{"tserv":"1","descripthion":"\u0418\u0442\u043e\u0 433\u043e\u0432\u044b\u0439 \u043e\u0442\u0447\u0451\u0442","server_name":"127 .0.0.1","login":"sa","password":"202cb962ac59075b9 64b07152d234b70","report":[{"id_namerep":"1","page_Qury":"report\\getdata.php ","description":"#","column":[{"name":"id","description":"#","show":"1","width": "50","align":"left"},{"name":"surname","descriptio n":"\u0418\u043c\u044f","show":"1","width":"50","a lign":"left"},{"name":"fname","description":"\u042 4\u0430\u043c\u0438\u043b\u0438\u044f","show":"1", "width":"50","align":"left"},{"name":"lname","desc ription":"\u041e\u0442\u0447\u0435\u0441\u0442\u04 32\u043e","show":"1","width":"50","align":"left"}]},{"id_namerep":"2","page_Qury":"report\\getdata.p hp","description":"#","column":[{"name":"id","description":"#","show":"1","width": "50","align":"left"},{"name":"surname","descriptio n":"\u0418\u043c\u044f","show":"1","width":"50","a lign":"left"},{"name":"fname","description":"\u042 4\u0430\u043c\u0438\u043b\u0438\u044f","show":"1", "width":"50","align":"left"},{"name":"lname","desc ription":"\u041e\u0442\u0447\u0435\u0441\u0442\u04 32\u043e","show":"1","width":"50","align":"left"}]},{"id_namerep":"3","page_Qury":"report\\getdata.p hp","description":"#","column":[{"name":"id","description":"#","show":"1","width": "50","align":"left"},{"name":"surname","descriptio n":"\u0418\u043c\u044f","show":"1","width":"50","a lign":"left"},{"name":"fname","description":"\u042 4\u0430\u043c\u0438\u043b\u0438\u044f","show":"1", "width":"50","align":"left"},{"name":"lname","desc ription":"\u041e\u0442\u0447\u0435\u0441\u0442\u04 32\u043e","show":"1","width":"50","align":"left"}]},{"id_namerep":"4","page_Qury":"report\\getdata.p hp","description":"#","column":[{"name":"id","description":"#","show":"1","width": "50","align":"left"},{"name":"surname","descriptio n":"\u0418\u043c\u044f","show":"1","width":"50","a lign":"left"},{"name":"fname","description":"\u042 4\u0430\u043c\u0438\u043b\u0438\u044f","show":"1", "width":"50","align":"left"},{"name":"lname","desc ription":"\u041e\u0442\u0447\u0435\u0441\u0442\u04 32\u043e","show":"1","width":"50","align":"left"}]}]}]}
Как в javascript теперь обращаться к элементам???
Как ни пробовал выдаёт ошибку возможно ли вообще с ним работать???
|