title: load duplicate keys from nested json file as dictionary of list
body: <p>I have a json file in this format,</p>
  
  <pre><code>{
    "details": {
  
      "hawk_branch": {
        "tandem": {
          "value": "4210bnd72"
        }
      },
      "uclif_branch": {
        "tandem": {
          "value": "e2nc712nma89",
          "value": "23s24212",
          "value": "12338cm82",
        }
      }
      }
  }
  </code></pre>
  
  <p>The problem is, I need to keep all the <code>value</code>, however when i use <code>json.load</code> to load this file i only get one <code>value</code>, which make sense since <code>dict</code> can keep only unique <code>keys</code>.</p>
  
  <p>Here is the expected output,</p>
  
  <pre><code>{ "hawk_branch": ["4210bnd72"] }
  { "uclif_branch": ["e2nc712nma89" , "23s24212", "12338cm82"] }
  </code></pre>
  
  <p>I have read this answer, <a href="https://stackoverflow.com/questions/29321677/python-json-parser-allow-duplicate-keys">Python json parser allow duplicate keys</a> to use <code>object_pairs_hook</code> like this,</p>
  
  <pre><code>def parse_object_pairs(pairs):
      return pairs
  
  # f is file
  json.load(f, object_pairs_hook=parse_object_pairs)
  </code></pre>
  
  <p>but it returns entire json file as <code>list</code>. </p>
  
  <p>I think its possible to do it using <code>lambda</code> as <code>object_pairs_hook</code> but i can't understand how can I use it.</p>
  
  <p>Can someone please guide me</p>