亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - JSON.parse(JSON.stringify(data))
曾經(jīng)蠟筆沒有小新
曾經(jīng)蠟筆沒有小新 2017-06-26 10:57:54
0
3
1005

Ask when to use JSON.parse(JSON.stringify(data))

曾經(jīng)蠟筆沒有小新
曾經(jīng)蠟筆沒有小新

reply all(3)
學(xué)霸

Generally used to deep copy a json object, it can also be used to remove attributes whose values ??do not have JSON representation (numbers, strings, logical values, arrays, objects, null), that is to say attributes like undefined and function value.

a: {
    age: 1,
    name: undefined,
    time: () => {...}
}
變成:
b: {
    age: 1
}
三叔

Objects can be copied

阿神

Two usage scenarios:
1. Convert JSON string to JSON object, JS direct attribute reference
2. Clone object

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template