{"ScriptPreparationCode":" var testData = {\r\n keys: [\u0022ID\u0022, \u0022ID_CONTACT\u0022, \u0022ID_CHAT\u0022, \u0022DATE\u0022, \u0022TEXT\u0022, \u0022BLOB\u0022, \u0022$HDN_BIN_BLOB\u0022, \u0022HAS_BLOB\u0022, \u0022BLOB_TYPE\u0022, \u0022BLOB_DURATION\u0022, \u0022BLOB_SIZE\u0022, \u0022$HDN_DateTime\u0022, \u0022$HDN_XCoord\u0022, \u0022$HDN_YCoord\u0022, \u0022$HDN_ZCoord\u0022, \u0022$PK\u0022, \u0022$HDN_IDState\u0022, \u0022$HDN_DescState\u0022, \u0022$HDN_NumBlob\u0022],\r\n values: []\r\n };\r\n\r\n for (var i = 0; i \u003C 1000; i\u002B\u002B) {\r\n testData.values.push([\r\n \u0022ID\u0022,\r\n \u0022ID_CONTACT\u0022 \u002B i,\r\n \u0022ID_CHAT\u0022 \u002B i,\r\n \u0022DATE\u0022 \u002B i,\r\n \u0022TEXT\u0022 \u002B i,\r\n \u0022BLOB\u0022 \u002B i,\r\n \u0022$HDN_BIN_BLOB\u0022 \u002B i,\r\n \u0022HAS_BLOB\u0022 \u002B i,\r\n \u0022BLOB_TYPE\u0022 \u002B i,\r\n \u0022BLOB_DURATION\u0022 \u002B i,\r\n \u0022BLOB_SIZE\u0022 \u002B i,\r\n \u0022$HDN_DateTime\u0022 \u002B i,\r\n \u0022$HDN_XCoord\u0022 \u002B i,\r\n \u0022$HDN_YCoord\u0022 \u002B i,\r\n \u0022$HDN_ZCoord\u0022 \u002B i,\r\n \u0022$PK\u0022 \u002B i,\r\n \u0022$HDN_IDState\u0022 \u002B i,\r\n \u0022$HDN_DescState\u0022 \u002B i,\r\n \u0022$HDN_NumBlob\u0022 \u002B i\r\n ]);\r\n }","TestCases":[{"Name":"tail","Code":"function objectJoin(data) {\r\n\tvar keys = data.keys\r\n \r\n function tailMap(arr) {\r\n \tif (!arr.length) return []\r\n \t\r\n \tconst [head, ...tail] = arr\r\n \t \r\n return [\r\n \tObject.fromEntries(keys.map((_, i) =\u003E [keys[i], head[i]])),\r\n ...tailMap(tail)\r\n ]\r\n }\r\n \r\n return tailMap(data.values)\r\n}\r\n\r\nobjectJoin(testData)","IsDeferred":false},{"Name":"jimmy reduce","Code":"var customReduce = data =\u003E {\r\n var keys = data.keys;\r\n return data.values.map(x =\u003E {\r\n return x.reduce((acc, curr, i) =\u003E {\r\n acc[keys[i]] = curr;\r\n return acc;\r\n }, {})\r\n })\r\n}\r\n\r\ncustomReduce(testData)","IsDeferred":false},{"Name":"tail 2","Code":"function objectJoin(data) {\r\n\tvar keys = data.keys\r\n \r\n function tailMap(arr) {\r\n \tif (!arr.length) return []\r\n \t\r\n \tconst [head, ...tail] = arr\r\n \t \r\n return [\r\n \tkeys.reduce((acc, act, i) =\u003E {\r\n \tacc[act] = head[i]\r\n return acc\r\n }),\r\n ...tailMap(tail)\r\n ]\r\n }\r\n \r\n return tailMap(data.values)\r\n}\r\n\r\nobjectJoin(testData)","IsDeferred":false}]}