(no title)
cameroncairns | 2 years ago
https://glom.readthedocs.io/en/latest/api.html#defaults-with...
e.g.
target = [{"a": {"b": "c"}}, {"a": {"c": "e"}}, {"a": {}}]
results = glom(target, [Coalesce("a.b", "a.c", default="")]) # -> ["c", "e", ""]
No comments yet.