如何用javascript解析动态数组

时间:2015-03-06 00:01:48

标签: javascript arrays json parsing multidimensional-array

Haw我可以解析这个json吗?

  

{" A" {" A" {" 1" {" 1":" 1&#34 ;," 2":" 2"" 3":" 3"" 4":&#34 ; 4"" 5":" 5"" 6":" 6"" 7" :" 7"}" 2" {" 1":" 8"" 2":&# 34; 9"" 3":" 10"" 4":" 11"" 5&#34 ;:" 12"" 6":" 13"" 7":" 14"},&# 34; 3" {" 1":" 15"" 2":" 16"" 3&# 34;:" 17"" 4":" 18"" 5":" 19"&# 34; 6":" 20"" 7":" 21"}}," B" {" 1" {" 1":" 22"" 2":" 23"" 3" :" 24"" 4":" 25"" 5":" 26"" 6":" 27"" 7":" 28"}" 2" {" 1&#34 ;:" 29"" 2":" 30"" 3":" 31"&#34 ; 4":" 32"" 5":" 33"" 6":" 34" " 7":" 35"}" 3" {" 1& #34;:" 36"" 2":" 37"" 3":" 38",& #34; 4":" 39"" 5":" 40"" 6":" 41&# 34;," 7":" 42"}}}}

我试试这个,但......不起作用,还有很多东西,但我对此非常新,我无法解决自己

for (var i = 0; i < datos.A.length; i++) {
    items.push( "<div class='rackCod'>" + val[0] + "</div>" );
}

0 个答案:

没有答案