title: reading json file python
body: <pre><code>js = {"Alex":{"b_":{"ep_0":"[1,2,3]"}, "g_":{"ep_0":"[3,4,5]"}, "f_":{"ep_0":"[3,4,5]", "ep_1":"[3,4,5]"}},
        "Sam":{"b_":{"ep_0":"[1,2,3]"}, "g_":{"ep_0":"[3,4,5]"}},
        "Joe":{"b_":{"ep_0":"[1,2,3]"}, "g_":{"ep_0":"[3,4,5]"}, "f_":{"ep_1":"[31,44,56]"}}
        }
  </code></pre>
  
  <p>I need to read ep_0 and ep_1 for each user, here is my snipped code:</p>
  
  <pre><code>users = [i for i in js.keys()]
  data = {}
  final_data = {}
  for key in users:
          for user in js[key].keys():
              if 'f_' not in key:
                  continue
              for z in js[users]['f_']:
                  if 'ep_0' not in z:
                      continue
                  data['ep0'] = js[user]['f_']['ep_0']
                  if 'ep_1' not in z:
                      continue
                  data['ep1'] = js[user]['f_']['ep_1']
                  final_data[user] = data
  
      print(final_data)
  </code></pre>
  
  <p>the output of my code is {} and desire output should be:</p>
  
  <pre><code>{'Alex': {'f_':{'ep_0':'[3,4,5]', 'ep_1':'[3,4,5]'}}, 'Joe': { 'f_':{'ep_1':'[31,44,56]'}} }
  </code></pre>