json. values Synchronous
Collect the values of a table into an array. Use it when you need a quick summary of contents but the original keys are not relevant.
Luau
json.values(value: Table) -> {any}Parameters
| Parameter | Type | Description |
|---|---|---|
value | Table | Table whose values should be collected. |
Returns
{any}An array of table values in iteration order.
Usage notes
Do not pair a separate json.keys call with a json.values call by index. Table iteration order is not a promised ordering for that use.
Example
Luau
local scores = { alice = 4, bob = 8 }
for _, score in ipairs(json.values(scores)) do
print(score)
end