English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This method is used to determine whether a specific key is defined as a key in the map
Is_key(key,map)
key −If this is the key in the map, then this is the key that needs to be determined.
map −This is the map in which the key needs to be searched.
If the key is found, it returns true; otherwise, it returns false.
-module(helloworld). -export([start/0]). start() -> Lst1 = [{"a",1},{"b",2},{"c",3}], Map1 = maps:from_list(Lst1), io:fwrite("~p~n",[maps:is_key("a",Map1).
Output Result
The output of the above program is as follows.
true