如何在javascript/jquery中创建JSON对象?
There is nothing like a JSON object. JSON stands for JavaScript Object Notation and is basically a string that encodes information similar to JavaScript's object literals.
You can however create such an encoding (which would result in a string) with JSON.stringify(object)
, see JSON in JavaScript. You could also create such a string manually, but it is very error prone and I don't recommend it.
How do I clone a JSON object in javascript/jquery?
As it is just a string:
var jsonString2 = jsonString;
我不能再使用javascript数组了.
JSON是exchange个数据的一种格式,它不是可以在应用程序中使用的数据 struct .
Maybe you want to read more about JSON, objects in JS and arrays in JS.