If You have only one key, “last_ip”, You could use Map.put like this. Use Map.put if You don’t care what was the previous value. Use Map.update if You want to combine the previous value with the new one.
last_ip = to_string(climes["ip"])
conn = %{conn | params: Map.put(conn.params, "last_ip", last_ip)}
Only if You want to add multiple keys, You would use Map.merge
You choose depending on your requirements.
I prefer to_string(climes[“ip”]}) over “#{climes[“ip”]}” when then is no real interpolation needed, but that is personal preference.
If your solution is working, that is fine too ![]()






















