copy
The copy
method returns a copy of the JSON object. Modifying the copy does not modify the original object.
Syntax
copy()
Returns
(LuaJsonObject). A copy of the object.
Example
local myJsonObject = LuaJsonObject:new( { product="IDOL" , version=11 } ) local anotherJsonObject = myJsonObject:copy() print (anotherJsonObject:string()) -- {"product":"IDOL","version":11}