I'm using glom project.
Is there a way to convert [{"id": 1, "name": "foo"}, {"id": 2, "name": "bar"}]
to {1: "foo", 2: "bar"}
?
I'm using glom project.
Is there a way to convert [{"id": 1, "name": "foo"}, {"id": 2, "name": "bar"}]
to {1: "foo", 2: "bar"}
?
Copyright © 2021 Jogjafile Inc.
New
glom
version (19.2.0) allows to useMerge
to merge two dicts.Docs: https://glom.readthedocs.io/en/latest/api.html?highlight=merge#glom.Merge