immutable.js - Immutable JS - Convert List to Map -


how turn

[['a', 1], ['b', 2]] 

into

{a: 1, b: 2} 

via immutable.js?

> var map = immutable.map([['a', 1], ['b', 2]]); 

works me.

> map.get('a'); 1 

http://facebook.github.io/immutable-js/docs/#/map


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -