title: Deep get item from json with default value in python
body: <p>I have arbitrarily nested json. I want to get some value that is several keys deep and have no guarantee that any of the keys are present.</p>
  
  <p>So, for example, I might want to get <code>value = json_dict['a'][1]['q']['e']</code> but at any point I could get a KeyError if <code>a</code>, <code>q</code>, or <code>e</code> don't exist, or an index out of bounds error if <code>json_dict['a']</code> has less than two items. If any of those conditions are true, I want <code>value</code> to be a default value, is there some way to do this is one or two lines without having to nest a bunch of if statements or <code>get</code> calls?</p>