hoylemd / deathdeath

death death and more death. death? death!
0 stars 0 forks source link

JSON object to map function #10

Open rocky1138 opened 12 years ago

rocky1138 commented 12 years ago

Build a function to loop through the properties in the JSON level object and change the properties of the play field spans to match the textures set in the object.

http://stackoverflow.com/questions/684672/loop-through-javascript-object

for (prop in p) { if (!p.hasOwnProperty(prop)) { //The current property is not a direct property of p continue; } //Do your logic with the property here }