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

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

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

StringGrid issue in Delphi XE8 firemonkey mobile app -