{"ScriptPreparationCode":"var response = {\r\n data: {\r\n property: \u0022value\u0022,\r\n },\r\n};\r\n","TestCases":[{"Name":"Direct Access","Code":"function directAccess () {\r\n return response.data.property;\r\n}\r\n\r\ndirectAccess();","IsDeferred":false},{"Name":"Defensive Check for Existence via If-statement","Code":"function defensiveCheckForExistenceViaIfStatement () {\r\n if (response \u0026\u0026 response.data \u0026\u0026 response.data.property) {\r\n return response.data.property;\r\n }\r\n}\r\n\r\ndefensiveCheckForExistenceViaIfStatement();","IsDeferred":false},{"Name":"Defensive Check for Existence via If-statement using \u0060hasOwnProperty\u0060","Code":"function defensiveCheckForExistenceViaIfStatementUsingHasOwnProperty () {\r\n if (response\r\n \u0026\u0026 Object.prototype.hasOwnProperty.call(response, \u0027data\u0027)\r\n \u0026\u0026 Object.prototype.hasOwnProperty.call(response.data, \u0027property\u0027)\r\n ) {\r\n return response.data.property;\r\n }\r\n}\r\n\r\ndefensiveCheckForExistenceViaIfStatementUsingHasOwnProperty();","IsDeferred":false},{"Name":"Defensive Check for Existence via Chaining","Code":"function defensiveCheckForExistenceViaChaining () {\r\n return response \u0026\u0026 response.data \u0026\u0026 response.data.property;\r\n}\r\n\r\ndefensiveCheckForExistenceViaChaining();","IsDeferred":false},{"Name":"Defensive Check for Existence via Chaining using \u0060hasOwnProperty\u0060","Code":"function defensiveCheckForExistenceViaChainingUsingHasOwnProperty () {\r\n return (\r\n \tresponse\r\n \u0026\u0026 Object.prototype.hasOwnProperty.call(response, \u0027data\u0027)\r\n \u0026\u0026 Object.prototype.hasOwnProperty.call(response.data, \u0027property\u0027)\r\n );\r\n}\r\n\r\ndefensiveCheckForExistenceViaChainingUsingHasOwnProperty();","IsDeferred":false}]}