Variable key names in Elixir
You can wrap strings and atoms with brackets in elixir to use them as keys in maps
var_key = :name
# This is the syntax for using that variable as a key name
%{[var_key] => "Jack Rosa"}
# => %{name: "Jack Rosa"}
Tweet