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