How to assign JSON data structure as a new object?

In RPG Maker VX, it's achieved this way:

map = RPG::Map.new(17, 15)This is very useful to alter data dynamically while the game is running. Anyone know how it can done in MV? There's no clue in the documentation. Although of course the bit of information can be taken from the .json files, but I was wondering if there was a more convenient way offered by MV.
to parse JSON string

var yourVar = JSON.parse(aJsonString); to make a JSON string from an object (i think it's same like Marshal.dump on Ace)

Code:
var yourVar = JSON.stringify(anObject);
to make a deep copy of an object, you can use
Code:
var yourVar = JSON.parse(JSON.stringify(anObject));
or
Code:
JsonEx.makeDeepCopy(anObject); 
Hope this could help you 🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-to-assign-json-data-structure-as-a-new-object.51712/