{"ScriptPreparationCode":"function makeid() {\r\n var text = \u0022\u0022;\r\n var possible = \u0022ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\u0022;\r\n\r\n for (var i = 0; i \u003C 5; i\u002B\u002B)\r\n text \u002B= possible.charAt(Math.floor(Math.random() * possible.length));\r\n\r\n return text;\r\n}\r\n\r\nwindow.parentObj = {};\r\nwindow.findMe = \u0027test-name-1\u0027;\r\n\r\nfor (let i = 0; i \u003C 100; i\u002B\u002B) {\r\n\twindow.parentObj[makeid()] = i === 50 ? window.findMe : makeid();\r\n}","TestCases":[{"Name":"reduce","Code":"let result;\r\nObject.entries(window.parentObj).reduce((prev, curr) =\u003E {\r\n const [identifier, componentName] = curr;\r\n if (window.findMe.includes(identifier)) {\r\n result = componentName;\r\n }\r\n return prev;\r\n}, \u0027\u0027);","IsDeferred":false},{"Name":"find","Code":"let result;\r\nconst key = Object.keys(window.parentObj).find(key =\u003E window.findMe.includes(key));\r\nresult = window.parentObj[key] || \u0027\u0027;","IsDeferred":false}]}