Skip to content

Instantly share code, notes, and snippets.

@matyasfodor
Created July 16, 2017 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matyasfodor/bddc46793aa24d8fa2672e42d87fd191 to your computer and use it in GitHub Desktop.
Save matyasfodor/bddc46793aa24d8fa2672e42d87fd191 to your computer and use it in GitHub Desktop.
bazById = {baz.id: baz for baz in foo.bazs}
foo.bar.bazs = {bazById[k]:v for k, v in foo.bar.bazs.items()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment