我真的停留在解析JSON字符串并将其取值。我得到的JSON字符串作为如何在JavaScript中解析JSON以取得价值
{"user":{"id":"1","firstname":"Freelogin","created":"0000-00-00 00:00:00","lastname":"Administrator","email":"[email protected]", "usergroup_id":"1","status":"1","ip_enable":"N","priv":"0","expire":""},"data":{ "1":{"5":{"last_update":"2010-12-13 16:16:16","status":"0"},"3":{"last_update":"2010-12-13 16:41:48","status":"1"}},"2":{"6":{"last_update":"2010-12-13 16:41:48","status":"1"}}},"server_array":[{"id":"1","name":"anes.yyy.net"},{ "id":"2","name":"neseema.xxx.net"}],"service_array":[{"id":"5","name":"POP3"}, {"id":"6","name":"Cpanel"},{"id":"3","name":"SMTP"}],"sort_by":"servername", "sort_order":"ASC","pagelinks":"","totrows":"2","offset":"0","limitvalue":"10", "rows_monitor":2,"current":"monitor","uri":false}
如何分析这一点,并采取进一步 处理结果在JavaScript
'eval'是不安全的,并且通常比原生解析更慢[http://www.vinylfox.com/json-decoding-speed-comparison/]。 – 2010-12-15 08:56:29
@Matthew:感谢您的评论,但我还在写作;-) – RageZ 2010-12-15 08:58:59