I've got an immutable map of maps.
let mapOfMaps = Immutable.fromJS({
'abc': {
id: 1
type: 'request'
},
'def': {
id: 2
type: 'response'
},
'ghi': {
type: cancel'
},
'jkl': {
type: 'edit'
}
});
How can I
- loop through mapOfMaps and get all the keys to print them out?
- loop through the keys of mapOfMaps to get all of the contents of the key?
I don't have the option of switching to a List at this stage.
I don't know how to loop through the keys.
Map
with the 1 level depth? – Cowpox