size
The size method returns the number of attributes (name/value pairs) in the JSON object.
Syntax
size()
Returns
(Number). The number of attributes in the JSON object.
Example
local myJsonObject = LuaJsonObject:new( { product="IDOL" , version=11 } )
print (myJsonObject:size())
-- 2