immutable.js get keys from map/hash
Although this question got answered a while ago, here is a little update:
ES6 Solution:
const [ ...keys ] = map.keys();
Pre ES6 Solution:
var keys = map.keySeq().toArray();
This is how ImmutableJS object looks like.
If you want to get:
["firstKey", "secondKey"]
You need to do:
console.log(map.keySeq().toArray())