set

Takes a provided map and provided data value and sets it within the map

Arguments

Name

Type

Description

key

String

The key to the set data to within the map

data

Any

The data value to set with our key

map

Map

The map we are adding the data too

Returns

Type

Description

Map

A map with the value set

Usage

set('b', 2, Map { 'a' => 1 }) // => Map { 'a' => 1 'b' => 2 }

Last updated