Skip to content
HTTP & JSON jsonExists

$jsonExists[]

$jsonExists is essential for safely navigating JSON data, especially when working with external API responses that may have optional fields. It returns ‘true’ or ‘false’ as a string, making it directly usable in $if conditions. Always check for key existence before accessing values with $jsonValue to avoid ambiguity between missing keys and genuinely empty values.

Syntax

bdfd
$jsonExists[key]

Examples

Verify Property Existence

$jsonParse[{"user":{"id":"123","premium":true}}]
$title[JSON Key Verification]
$description[Does user.premium exist? **$jsonExists[user.premium]**]
$color[#57F287]
$sendMessage[]