JavaScript access objects with wildcard for key -


i have javascript object this:

e {_layers: object, _inithookscalled: true, _leaflet_id: 25, _map: e, constructor: function…}   _inithookscalled: true   _layers: object     38: e      _container: g      _ini      _mradius: 107 

i want access radius. number 38 changes case case. kind of wildcard.

myobject._layers[??]._mradius 

you can this:

myobject._layers[object.keys(myobject._layers)[0]]._mradius 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -