{"ScriptPreparationCode":"function getRandomString(length) {\r\n const charset = \u0022ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\u0022;\r\n let result = \u0022\u0022;\r\n for (let i = 0; i \u003C length; i\u002B\u002B) {\r\n const randomIndex = Math.floor(Math.random() * charset.length);\r\n result \u002B= charset.charAt(randomIndex);\r\n }\r\n return result;\r\n}\r\n\r\nfunction getRandomBoolean() {\r\n return Math.random() \u003C 0.5; // Generates true or false with roughly equal probability\r\n}\r\n\r\nfunction generateArrayOfJSONObjects(length) {\r\n const jsonArray = [];\r\n for (let i = 0; i \u003C length; i\u002B\u002B) {\r\n const jsonObject = {\r\n name: getRandomString(10), // Change 10 to the desired length of the random string\r\n value: getRandomBoolean(),\r\n };\r\n jsonArray.push(jsonObject);\r\n }\r\n return jsonArray;\r\n}","TestCases":[{"Name":"Lodash","Code":"const array = generateArrayOfJSONObjects(1000);\r\nconst found = _.some(array, s =\u003E s.value);","IsDeferred":false},{"Name":"JS some","Code":"const array = generateArrayOfJSONObjects(1000);\r\nconst found = array.some(s =\u003E s === \u0027oranges\u0027);","IsDeferred":false}]}