DEV Community

Discussion on: Which Data Structure Should I Use? An Elixir Cheat Sheet

Collapse
 
tmtasim profile image
Taner Tasim

Its easy, if the keys are atoms than with . :) If they are with String you cannot access with . In my head the two dots that are used for atom declaration are reminding me that i must use . while trying to access. One more thing worth mention is that if you try to access something with . and there is no such key it will give you error - key ... not found in .. but if you use strings as keys even the key is not there, it will just return nil it will not give you error