def walkdict(obj, key):
  stack = obj.items()
  while stack:
    k, v = stack.pop()
    out("key: %s value: %s" % (k, v))
    if isinstance(v, dict):
      stack.extend(v.iteritems())
    else:
      if k == key:
        return v
  return None
Take a JSON object and key and return the first matched value from the object.
dataset/ETHPy150Open miklevin/pipulate/common.py/walkdict