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
glomversion (19.2.0) allows to useMergeto merge two dicts.Docs: https://glom.readthedocs.io/en/latest/api.html?highlight=merge#glom.Merge