怎么把数组转化成json
收起
云计算小粉
2018-05-10 19:59:01
1642
0
1
条回答
写回答
取消
提交回答
-
https://msdn.microsoft.com/zh-cn/library/cc836459(v=vs.94).aspx
====核心实现如下====
var continents = new Array();
continents[0] = "Europe";
continents[1] = "Asia";
continents[2] = "Australia";
continents[3] = "Antarctica";
continents[4] = "North America";
continents[5] = "South America";
continents[6] = "Africa";
var jsonText = JSON.stringify(continents);
2019-07-17 22:09:21