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.

Syntax
Luau
json.values(value: Table) -> {any}

Parameters

Function parameters
ParameterTypeDescription
valueTableTable 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

Example
Luau
local scores = { alice = 4, bob = 8 }
for _, score in ipairs(json.values(scores)) do
    print(score)
end
Kawaii documentation