JSON.stringify() メソッドと、JSON.parse() メソッドを使う。
var obj = {name : "yamada", id : "001"};
var copyObj = JSON.parse(JSON.stringify(obj));
Go to list of users who liked
More than 3 years have passed since last update.
JSON.stringify() メソッドと、JSON.parse() メソッドを使う。
var obj = {name : "yamada", id : "001"};
var copyObj = JSON.parse(JSON.stringify(obj));
Register as a new user and use Qiita more conveniently
Go to list of users who liked