JSFiddle - React, Tailwind, and code Playground
JavaScript
var actualGameData = [{
"gameBackgroundMusic": "background.wav",
"narratorCongratulations": "congratulations.wav",
"hitSound": [
"hit1.wav",
"hit2.wav",
"hit3.wav"
],
"narratorHitSound": [
"narratorhit1.wav",
"narratorhit2.wav",
"narratorhit3.wav"
],
"narratorMissSound": [
"narratormiss1.wav",
"narratormiss2.wav",
"narratormiss3.wav"
],
"levels": {
"Tumble in the Castle": {
"Time Limit": 60000,
"Background Image": {
"Object Name": "backgroundCastle",
"Image": "backgroundCastle.png"
},
"Foreground Image": {
"Object Name": "foregroundCastle",
"Image": "foregroundCastle.png"
},
"Targets": {
"Target1": {
"x axis": 45,
"y axis": 11
},
"Target2": {
"x axis": 545,
"y axis": 141
},
"Target3": {
"x axis": 495,
"y axis": 33
}
}
},
"Jungle Rumble": {
"Time Limit": 30000,
"Background Image": {
"Object Name": "backgroundJungle",
"Image": "backgroundJungle.png"
},
"Foreground Image": {
"Object Name": "foregroundJungle",
"Image": "foregroundJungle.png"
},
"Targets": {
"Target1": {
"x axis": 465,
"y axis": 141
},
"Target2": {
"x axis": 525,
"y axis": 111
},
"Target3": {
"x axis": 405,
"y axis": 63
}
}
}
}
}];
$.each(actualGameData, function() {
for (var levelName in this.levels) {
alert(levelName);
}
});