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
Post a Comment