mkrd/DictDataBase

Add XPath-like searching for keys

mkrd opened this issue · 1 comments

mkrd commented
{
  "users": {
    "Ben": {
      "age": 30,
      "job": "Software Engineer"
    }
  },
  "Ben": {"job": "Plumber"}
}
print(DDB.at("users", key="job").read())
>>> "Plumber"

Have you thought about requiring the key to be more explicit? Maybe something like XPath (key='Ben/job'), jq (key='.Ben.job'), or glom (key='Ben.job'), or something else?

Hi, could you check this PR for this functionality?
#42