{"ScriptPreparationCode":null,"TestCases":[{"Name":"Big code way","Code":"const person2 = {\r\n first: {\r\n \ttest: \u0022Testas\u0022\r\n }\r\n};\r\n\r\nconst resolve = (currentLabels, translationKey) =\u003E {\r\n const pathToFollowInLabels = translationKey.split(\u0022.\u0022)\r\n let currentPositionInLabels = currentLabels\r\n for (let i = 0; i \u003C pathToFollowInLabels.length; i\u002B\u002B) {\r\n currentPositionInLabels = currentPositionInLabels[pathToFollowInLabels[i]]\r\n if (!currentPositionInLabels) {\r\n return translationKey\r\n }\r\n }\r\n return currentPositionInLabels\r\n}\r\n\r\nresolve(person2, \u0022first.test\u0022);","IsDeferred":false},{"Name":"Reduce way","Code":"const person2 = {\r\n first: {\r\n \ttest: \u0022Testas\u0022\r\n }\r\n};\r\n\r\nconst resolve = (path, obj) =\u003E\r\n path.split(\u0022.\u0022).reduce((prev, curr) =\u003E prev[curr], obj || this);\r\n\r\nresolve(\u0022first.test\u0022, person2);","IsDeferred":false}]}