Undefined values: Difference between revisions
Content added Content deleted
(jq) |
(→{{header|jq}}: {}["key"] yields null) |
||
Line 560: | Line 560: | ||
=={{header|jq}}== |
=={{header|jq}}== |
||
Given a JSON object, o, and a key, k, that is not present in that object, then o[k] evaluates to null, e.g. |
|||
⚫ | |||
<lang |
<lang jq>{}["key"] #=> null</lang> |
||
false</lang> |
|||
⚫ | |||
<lang jq>1/0 == null #=>false</lang> |
|||
It should also be noted that in jq, null can combine with other values to form non-null values. Specifically, for any JSON entity, e, |
It should also be noted that in jq, null can combine with other values to form non-null values. Specifically, for any JSON entity, e, |