与Object.entries()Immutablejs Map 相同的是什么.基本上,我枚举对象的键/值对来呈现表示组件
{
Object.entries(filteredNetworks)
.map(([key, value]) =><option key={key} value={key}>{value}</option>)
}
Run Code Online (Sandbox Code Playgroud)
现在,filteredNetworks作为一个不可变的地图,我怎么能这样做?(不使用.toJS())
我刚开始使用crossfilter和d3.js ...我正在尝试API参考中给出的一些片段...我有以下数据
var payments = crossfilter([
{date: "2011-11-14T16:17:54Z", quantity: 2, total: 190, tip: 100, type: "tab"},
{date: "2011-11-14T16:20:19Z", quantity: 2, total: 190, tip: 100, type: "tab"},
{date: "2011-11-14T16:28:54Z", quantity: 1, total: 300, tip: 200, type: "visa"},
{date: "2011-11-14T16:30:43Z", quantity: 2, total: 90, tip: 0, type: "tab"},
{date: "2011-11-14T16:48:46Z", quantity: 2, total: 90, tip: 0, type: "tab"},
{date: "2011-11-14T16:53:41Z", quantity: 2, total: 90, tip: 0, type: "tab"},
{date: "2011-11-14T16:54:06Z", quantity: 1, total: 100, tip: 0, type: "cash"},
{date: "2011-11-14T16:58:03Z", quantity: 2, …Run Code Online (Sandbox Code Playgroud)