{"action":"created","issue":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-stdlib/issues/573","repository_url":"https://api.github.com/repos/puppetlabs/puppetlabs-stdlib","labels_url":"https://api.github.com/repos/puppetlabs/puppetlabs-stdlib/issues/573/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-stdlib/issues/573/comments","events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-stdlib/issues/573/events","html_url":"https://github.com/puppetlabs/puppetlabs-stdlib/pull/573","id":132378131,"number":573,"title":"Add dig function","user":{"login":"keymone","id":7057,"avatar_url":"https://avatars.githubusercontent.com/u/7057?v=3","gravatar_id":"","url":"https://api.github.com/users/keymone","html_url":"https://github.com/keymone","followers_url":"https://api.github.com/users/keymone/followers","following_url":"https://api.github.com/users/keymone/following{/other_user}","gists_url":"https://api.github.com/users/keymone/gists{/gist_id}","starred_url":"https://api.github.com/users/keymone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keymone/subscriptions","organizations_url":"https://api.github.com/users/keymone/orgs","repos_url":"https://api.github.com/users/keymone/repos","events_url":"https://api.github.com/users/keymone/events{/privacy}","received_events_url":"https://api.github.com/users/keymone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-02-09T10:08:00Z","updated_at":"2016-02-15T16:01:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-stdlib/pulls/573","html_url":"https://github.com/puppetlabs/puppetlabs-stdlib/pull/573","diff_url":"https://github.com/puppetlabs/puppetlabs-stdlib/pull/573.diff","patch_url":"https://github.com/puppetlabs/puppetlabs-stdlib/pull/573.patch"},"body":"Makes deep lookup in nested hashes(and/or arrays) easier.\r\n\r\nUsage:\r\n\r\n    dig($hash, [\"key1\", \"key2\", ...])\r\n    dig($hash, [\"key1\", \"key2\", ...], \"default\")\r\n    dig(\r\n      [{\"a\" => {\"b\" => \"c\"}}],\r\n      [0, \"a\", \"b\"]) # => \"c\"\r\n\r\nReturns `nil` or optional `default` arg if at any point in the chain key couldn't be looked up."},"comment":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-stdlib/issues/comments/184271906","html_url":"https://github.com/puppetlabs/puppetlabs-stdlib/pull/573#issuecomment-184271906","issue_url":"https://api.github.com/repos/puppetlabs/puppetlabs-stdlib/issues/573","id":184271906,"user":{"login":"tphoney","id":10402706,"avatar_url":"https://avatars.githubusercontent.com/u/10402706?v=3","gravatar_id":"","url":"https://api.github.com/users/tphoney","html_url":"https://github.com/tphoney","followers_url":"https://api.github.com/users/tphoney/followers","following_url":"https://api.github.com/users/tphoney/following{/other_user}","gists_url":"https://api.github.com/users/tphoney/gists{/gist_id}","starred_url":"https://api.github.com/users/tphoney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tphoney/subscriptions","organizations_url":"https://api.github.com/users/tphoney/orgs","repos_url":"https://api.github.com/users/tphoney/repos","events_url":"https://api.github.com/users/tphoney/events{/privacy}","received_events_url":"https://api.github.com/users/tphoney/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T16:01:56Z","updated_at":"2016-02-15T16:01:56Z","body":"The test cases that @hunner marked to be kept are important. The try_get_value function should still be able to function with a single parameter, otherwise it might affect how current users are using try_get_value. "}}