的JavaScript訪問對象我有一個JavaScript對象是這樣的:帶通配符關鍵
e {_layers: Object, _initHooksCalled: true, _leaflet_id: 25, _map: e, constructor: function…}
_initHooksCalled: true
_layers: Object
38: e
_container: g
_ini
_mradius: 107
我要訪問radius
。然而,編號38
因案件而異。所以我在尋找某種通配符。
myObject._layers[??]._mRadius
這會否是該對象的唯一因素? – thefourtheye
是的。該值僅從對象變爲對象。 – ustroetz