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

javascript - Create websocket without connecting -

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

android - Linear layout children not scrolling -