diff --git a/source/_docs/configuration/templating.markdown b/source/_docs/configuration/templating.markdown index 66dfe920f50..f7b5f158180 100644 --- a/source/_docs/configuration/templating.markdown +++ b/source/_docs/configuration/templating.markdown @@ -515,10 +515,14 @@ The `is_defined` filter allows to throw an error if a value or object is not def Example using `is_defined` to parse a JSON payload: +{% raw %} + ```text {{ value_json.val | is_defined }} ``` +{% endraw %} + This will throw an error `UndefinedError: 'value_json' is undefined` if the JSON payload has no `val` attribute.