keys

  • function
can.Map.keys  

Returns an array of the map's keys.

can.Map.keys(map)

Parameters

  1. map {can.Map}

    the can.Map to get the keys from

Returns

{Array}

array An array containing the keys from map.

keys iterates over a map to get an array of its keys.

var people = new can.Map({
    a: 'Alice',
    b: 'Bob',
    e: 'Eve'
});

can.Map.keys(people); // ['a', 'b', 'e']