get
Retrieves the value associated with a specified key
(get key obj)
Returns
The get
function returns the value associated with the specified key in the map object. If the key is not found or if any intermediate nested key is missing, it returns null
Parameters
key (string) - the key to retrieve the corresponding value from the object
obj (object) - he map object from which to retrieve the value
Examples
(get "name" {name: "John", age: 22}) ;; get value for key name
;;=> John
(get "agenda.phone" {agenda: {phone: 22, other: 22}})
;;=> 22
Was this helpful?