Created
June 7, 2021 22:23
-
-
Save BrooklinJazz/ab8135bf5eb8bbf14cc3af44380d1315 to your computer and use it in GitHub Desktop.
Map get syntax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # with string syntax | |
| map = %{"key" => "value"} | |
| Map.get(map, "key") # value | |
| # with atom syntax | |
| map = %{key: "value"} | |
| Map.get(map, :key) # value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment