copy

The copy method returns a copy of the array. Modifying the copy does not modify the original array.

Syntax

copy()

Returns

(LuaJsonArray). A copy of the array.

Example

local myJsonArray = LuaJsonArray:new(4,"a string",true)
local anotherJsonArray = myJsonArray:copy()
print (anotherJsonArray:string())
-- [4, "a string", true]

_HP_HTML5_bannerTitle.htm