title: How to return all paths from a dictionary?
body: <p>Lets say i have this dictionary</p>
  <pre><code>obj = {'layerA1':'string','layerA2':{'layerB1':{'layerC1':{},'layerC2':{}},
                                       'layerB2':{}}}
  
  </code></pre>
  <p>i would need to return</p>
  <pre><code>['layerA2','layberB1','layerC1']
  ['layerA2','layerB1','layerC2']
  ['layerA2','layerB2']
  </code></pre>
  <p>It should work regardless of how deep the dictionary gets.
  Currently trying with some recursive functions but i can't seem to get it right.
  What i currently have is this:</p>
  <pre><code>obj = {'layerA1':'string','layerA2':{'layerB1':{'layerC1':{},'layerC2':{}},
                                       'layerB2':{}}}
  
  
  hierarchy_list = []
  def find_hierachy(param):
      some_list = []
      for key, value in param.items():
          if type(param[key]) is dict:
              some_list.append(key)
              hierarchy_list.append(some_list)
              find_hierachy(param[key])
  
  find_hierachy(obj)
  print(hierarchy_list)
  
  [['layerA2'], ['layerB1', 'layerB2'], ['layerC1', 'layerC2'], ['layerC1', 'layerC2'], ['layerB1', 'layerB2']]
  </code></pre>
  <p>I don't know how to get it to return each hierarchical path made of keys</p>