json.json.has
Declaration
lua
json.has(data, path)
Description
Check if path exists in data.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
data | table|string | Required | — | |
path | string | Required | — |
Return Values
| Type | Description |
|---|---|
| boolean |
Example
lua
if json.has(data, "users.0") then ... end