Skip to content

dict::create ​

create(values) ​

ParameterTypeDescription
valuesIterableAn Iterable of key-value-pairs

Returns ​

(Dictionary) A new Dictionary based on the given values.

Example ​

elk
[["a", 1], ["b", 2]] | dict::create
#=>
# {
#   "a": 1,
#   "b": 2,
# }
[["a", 1], ["b", 2]] | dict::create
#=>
# {
#   "a": 1,
#   "b": 2,
# }