如果我有以下对象:
JsonObj = {
"frames": {
"cinema": {
"sourceSize": { "w": 256, "h": 200 },
"frame": { "x": 0, "y": 0, "w": 256, "h": 192 }
},
"tree": {
"sourceSize": { "w": 128, "h": 110 },
"frame": { "x": 0, "y": 302, "w": 70, "h": 96 }
}
}
};
Run Code Online (Sandbox Code Playgroud)
parsedJSON使用此JavaScript代码将此JSON对象解析为变量:
var parsedJSON = JSON.parse(JsonObj);
Run Code Online (Sandbox Code Playgroud)
如何将"frames"属性重命名parsedJSON为其他内容?
javascript ×1