json.objValues
This function gets the list of all top-level values of a JSON object.
Syntax
json.objValues(jsonObject)
Arguments
Argument |
Type |
Description |
---|---|---|
jsonObject |
any |
The JSON object. |
Returns
Type |
Description |
---|---|
array |
The list of all top-level values in the JSON object. |
Examples
Let us say the jsonObject includes the following:
jsonObject = {
"id": 1,
"name": "bob"
}
The function json.objValues(jsonObject)
returns [1, "bob"]
.