map_get

map_get($map, $key)

Returns the value in a map associated with the given key. If the map doesn’t have such a key, returns null.

Examples:

map-get(("foo": 1, "bar": 2), "foo") => 1
map-get(("foo": 1, "bar": 2), "bar") => 2
map-get(("foo": 1, "bar": 2), "baz") => null

Parameters:

  • $map (Map)
  • $key (Base)

Returns:

  • (Base) The value indexed by $key, or null if the map doesn’t contain the given key

Raises:

  • (ArgumentError) if $map is not a map
doc_Sass
2016-11-11 13:09:13
Comments
Leave a Comment

Please login to continue.