hasKey
Check if an object has a property with the given key name.
object(required): the object to checkkey(required): property name as string
bash
echo '{"name": "Alice", "email": "alice@example.com"}' | utlx -e 'hasKey($input, "email")'
# trueutlx
if (hasKey($input, "shippingAddress")) {
address: $input.shippingAddress
} else {
address: $input.billingAddress
}Also: containsValue(object, value) — check if any property has a specific value.