empty
The empty
method checks whether the JSON array is empty.
Syntax
empty()
Returns
(Boolean). Returns true
if the array is empty.
Example
local myJsonArray = LuaJsonArray:new(4,"a string",true) print ("Is the array empty? " , myJsonArray:empty() ) -- Is the array empty? false myJsonArray:clear() print ("Is the array empty? " , myJsonArray:empty() ) -- Is the array empty? true