mapValues
Syntax
<object>.mapValues(expr)Arguments
Examples
{"a": 1, "b": 2, "c": 3}.mapValues($this * 2)
// {"a": 2, "b": 4, "c": 6}{"a": 3, "b": 8}.mapValues($this > 5)
// {"a": false, "b": true}{"x": "hello", "y": "world"}.mapValues(toUpper())
// {"x": "HELLO", "y": "WORLD"}{"a": 1, "b": 2}.mapValues($key)
// {"a": "a", "b": "b"}Last updated