{"ScriptPreparationCode":"const birdSpecies = {\r\n forest: {\r\n species: [\r\n {\r\n name: \u0022Northern Cardinal\u0022,\r\n physicalCharacteristics: {\r\n color: \u0022Red\u0022,\r\n size: \u0022Medium\u0022,\r\n beakType: \u0022Conical\u0022\r\n },\r\n diet: {\r\n primary: \u0022Seeds\u0022,\r\n secondary: \u0022Fruits\u0022\r\n },\r\n habitat: \u0022Woodlands and forests\u0022\r\n },\r\n {\r\n name: \u0022Woodpecker\u0022,\r\n physicalCharacteristics: {\r\n color: \u0022Black, White, and Red\u0022,\r\n size: \u0022Medium\u0022,\r\n beakType: \u0022Chisel-shaped\u0022\r\n },\r\n diet: {\r\n primary: \u0022Insects\u0022,\r\n secondary: \u0022Tree sap\u0022\r\n },\r\n habitat: \u0022Wooded areas\u0022\r\n }\r\n ]\r\n },\r\n desert: {\r\n species: [\r\n {\r\n name: \u0022Roadrunner\u0022,\r\n physicalCharacteristics: {\r\n color: \u0022Brown and White\u0022,\r\n size: \u0022Medium\u0022,\r\n beakType: \u0022Long and Slim\u0022\r\n },\r\n diet: {\r\n primary: \u0022Insects\u0022,\r\n secondary: \u0022Small reptiles\u0022\r\n },\r\n habitat: \u0022Desert and arid regions\u0022\r\n },\r\n {\r\n name: \u0022Cactus Wren\u0022,\r\n physicalCharacteristics: {\r\n color: \u0022Brown with streaks\u0022,\r\n size: \u0022Small\u0022,\r\n beakType: \u0022Curved\u0022\r\n },\r\n diet: {\r\n primary: \u0022Insects\u0022,\r\n secondary: \u0022Seeds\u0022\r\n },\r\n habitat: \u0022Cacti and desert shrubs\u0022\r\n }\r\n ]\r\n },\r\n wetlands: {\r\n species: [\r\n {\r\n name: \u0022Great Blue Heron\u0022,\r\n physicalCharacteristics: {\r\n color: \u0022Blue-gray\u0022,\r\n size: \u0022Large\u0022,\r\n beakType: \u0022Long and Sharp\u0022\r\n },\r\n diet: {\r\n primary: \u0022Fish\u0022,\r\n secondary: \u0022Amphibians\u0022\r\n },\r\n habitat: \u0022Wetlands and marshes\u0022\r\n },\r\n {\r\n name: \u0022American Coot\u0022,\r\n physicalCharacteristics: {\r\n color: \u0022Dark gray with white bill\u0022,\r\n size: \u0022Medium\u0022,\r\n beakType: \u0022Flat and short\u0022\r\n },\r\n diet: {\r\n primary: \u0022Aquatic plants\u0022,\r\n secondary: \u0022Small invertebrates\u0022\r\n },\r\n habitat: \u0022Lakes and wetlands\u0022\r\n }\r\n ]\r\n }\r\n}\r\n\r\nconst frozenObject = Object.freeze(birdSpecies)\r\nconst nonFrozenObject = birdSpecies\r\n","TestCases":[{"Name":"Loop frozen object","Code":"function doStuff(value) {\r\n //\r\n}\r\n\r\nfor (const habitat in frozenObject) {\r\n const data = frozenObject[habitat];\r\n for (const bird of data.species) {\r\n for (const key in bird.physicalCharacteristics) {\r\n const value = bird.physicalCharacteristics[key];\r\n doStuff(value);\r\n }\r\n for (const key in bird.diet) {\r\n const value = bird.diet[key];\r\n doStuff(value);\r\n }\r\n }\r\n}","IsDeferred":false},{"Name":"Loop non-frozen object","Code":"function doStuff(value) {\r\n //\r\n}\r\n\r\nfor (const habitat in nonFrozenObject) {\r\n const data = frozenObject[habitat];\r\n for (const bird of data.species) {\r\n for (const key in bird.physicalCharacteristics) {\r\n const value = bird.physicalCharacteristics[key];\r\n doStuff(value);\r\n }\r\n for (const key in bird.diet) {\r\n const value = bird.diet[key];\r\n doStuff(value);\r\n }\r\n }\r\n}","IsDeferred":false}]}