English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This method is used to return all values in the map.
values(map)
map1 −This is the map that needs to return all values.
Return a list of values from a map.
-module(helloworld). -export([start/0]). start() -> Lst1 maps:from_list([{"a",1},{"b",2},{"c",3}], Map1 maps:from_list(Lst1)), io:fwrite("~p~n",[maps:values(Map1)]).
Output Result
The output of the above program is as follows-
[1,2,3]