This is one of the things I learned from Programming Erlang, 2nd Ed
, but doesn't seem to work on shell
$ erl
Erlang/OTP 17 [erts-6.2] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
Eshell V6.2 (abort with ^G)
1> Dic = #{b => 1, a => 2}.
#{a => 2,b => 1}
2> maps:to_json(Dic).
** exception error: undefined function maps:to_json/1
3>
What's wrong here?