{"action":"created","issue":{"url":"https://api.github.com/repos/cobalt-org/cobalt.rs/issues/382","repository_url":"https://api.github.com/repos/cobalt-org/cobalt.rs","labels_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/issues/382/labels{/name}","comments_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/issues/382/comments","events_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/issues/382/events","html_url":"https://github.com/cobalt-org/cobalt.rs/issues/382","id":299545452,"number":382,"title":"Check if page.data.x is defined","user":{"login":"gibfahn","id":15943089,"avatar_url":"https://avatars0.githubusercontent.com/u/15943089?v=4","gravatar_id":"","url":"https://api.github.com/users/gibfahn","html_url":"https://github.com/gibfahn","followers_url":"https://api.github.com/users/gibfahn/followers","following_url":"https://api.github.com/users/gibfahn/following{/other_user}","gists_url":"https://api.github.com/users/gibfahn/gists{/gist_id}","starred_url":"https://api.github.com/users/gibfahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gibfahn/subscriptions","organizations_url":"https://api.github.com/users/gibfahn/orgs","repos_url":"https://api.github.com/users/gibfahn/repos","events_url":"https://api.github.com/users/gibfahn/events{/privacy}","received_events_url":"https://api.github.com/users/gibfahn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-22T23:22:21Z","updated_at":"2018-02-23T01:19:18Z","closed_at":"2018-02-22T23:48:15Z","author_association":"NONE","body":"Is there a way to check whether a variable is defined?\r\n\r\nI've tried some suggestions from https://github.com/Shopify/liquid/issues/89 and https://github.com/Shopify/liquid/issues/223, and haven't found something that works.\r\n\r\nTrying something like:\r\n\r\n```md\r\n{% if page.data.nav  %}\r\n## Foo\r\n{% endif %}\r\n```\r\n\r\nresults in\r\n\r\n```rust\r\nError: Failed to render content for \"index.html\"\r\nCaused by: Rendering error: Invalid index `nav` for value \r\n`Object({\"heading\": Str(\"Gibson Fahnestock\")})`\r\n```"},"comment":{"url":"https://api.github.com/repos/cobalt-org/cobalt.rs/issues/comments/367878854","html_url":"https://github.com/cobalt-org/cobalt.rs/issues/382#issuecomment-367878854","issue_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/issues/382","id":367878854,"user":{"login":"gibfahn","id":15943089,"avatar_url":"https://avatars0.githubusercontent.com/u/15943089?v=4","gravatar_id":"","url":"https://api.github.com/users/gibfahn","html_url":"https://github.com/gibfahn","followers_url":"https://api.github.com/users/gibfahn/followers","following_url":"https://api.github.com/users/gibfahn/following{/other_user}","gists_url":"https://api.github.com/users/gibfahn/gists{/gist_id}","starred_url":"https://api.github.com/users/gibfahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gibfahn/subscriptions","organizations_url":"https://api.github.com/users/gibfahn/orgs","repos_url":"https://api.github.com/users/gibfahn/repos","events_url":"https://api.github.com/users/gibfahn/events{/privacy}","received_events_url":"https://api.github.com/users/gibfahn/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T01:19:18Z","updated_at":"2018-02-23T01:19:18Z","author_association":"NONE","body":"I tried that but couldn't get it to work:\r\n\r\n```rust\r\n{% if page.data contains nav  %}\r\n## Foo\r\n{% endif %}\r\n```\r\n\r\n```\r\nError: Failed to render content for \"index.html\"\r\nCaused by: Rendering error: Object key not found: \"nav\"\r\n```"}}
{"actor":{"display_login":"gibfahn"}}