def json_value_from_dotted_path(path, json_obj):
    """
    e.x. json_obj={ "key1": { "key2": { "key3": value_1 } } }
         path = key1.key2.key3
          ->  return value_1, 0

         if key not found then
          ->  return None, 1
    """

    keys = path.split('.')
    rv = json_obj
    for key in keys:
        key = "type_" if key == "type" else key
        try:
            rv = rv[key]
        except KeyError:
            return None, 1
    return rv, 0