javascript - Get objects from an object array -


if have array looks this;

markers[56] = { label: "one" }; markers[62] = { label: "two" }; markers[87] = { label: "three" }; markers[125] = { label: "four" }; 

now have js;

for (var thismarker in markers) {   //what goes here can access "label" property? } 

i know simplistic later on there many more properties added object not "label".

i believe can access this,

for (var thismarker in markers) {   alert(markers[thismarker].label); } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -