Syntax
json.values(object: table): tableArguments
| Name | Type | Description |
|---|---|---|
object | table | Object, table, or drawing value to inspect or change. |
Returns
| Name | Type | Description |
|---|---|---|
values | table | Array table containing object values. |
Description
Returns the values of a JSON object as an array table.
Call it with 1 parameter(s): object. The argument table explains which values are required and which ones only refine the behavior.
It returns values (table). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Collect an object's values into a JSON array.
local record = {
first = "one",
second = "two",
}
for _, value in ipairs(json.values(record)) do
print(value)
end