我正在使用美国人口普查 API,并从 jQuery.get() 请求中得到一个二维 json 数组。我的结果(数据)如下所示:
[["P0010001","NAME","state","county","tract"], ["2703","Census Tract 4001.01","17","119","400101"], ["5603","Census Tract 4001.02","17","119","400102"], ["4327","Census Tract 4002","17","119","400200"]]
它看起来完全像一个二维 javascript 数组,但是当我尝试时我无法像访问它一样访问它:
var population = data;
alert(population[1][0]);
有没有办法将 json 数组转换为 javascript 数组,或者将其转换为字符串,然后可以将其放入数组中?