{"ScriptPreparationCode":null,"TestCases":[{"Name":"foreach","Code":"const maConstante = [\r\n {\r\n as: [\r\n {\r\n bs: [\r\n {\r\n ids: [\u0027c0ec299b-1029-4dcf-9cb2-1a2b3c4d5e6f\u0027, \u0027d0d0e0e0-3045-4e5e-8b8b-9a9a8a8a7a7a\u0027]\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n as: [\r\n {\r\n bs: [\r\n {\r\n ids: [\u0027f0f0e0e0-5060-4e5e-8b8b-9a9a8a8a7a7a\u0027]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n]\r\n\r\nfunction createRecordFromIdsForEach(obj) {\r\n const record = {};\r\n\r\n obj.forEach(({ as }) =\u003E {\r\n as.forEach(({ bs }) =\u003E {\r\n bs.forEach(({ ids }) =\u003E {\r\n ids.forEach((id) =\u003E {\r\n record[id] = true;\r\n });\r\n });\r\n });\r\n });\r\n\r\n return record;\r\n}\r\n\r\ncreateRecordFromIdsForEach(maConstante)","IsDeferred":false},{"Name":"reduce","Code":"const maConstante = [\r\n {\r\n as: [\r\n {\r\n bs: [\r\n {\r\n ids: [\u0027c0ec299b-1029-4dcf-9cb2-1a2b3c4d5e6f\u0027, \u0027d0d0e0e0-3045-4e5e-8b8b-9a9a8a8a7a7a\u0027]\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n as: [\r\n {\r\n bs: [\r\n {\r\n ids: [\u0027f0f0e0e0-5060-4e5e-8b8b-9a9a8a8a7a7a\u0027]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n]\r\n\r\nfunction createRecordFromIdsReduce(obj) {\r\n return obj.reduce((record, { as }) =\u003E {\r\n as.forEach(({ bs }) =\u003E {\r\n bs.forEach(({ ids }) =\u003E {\r\n ids.forEach((id) =\u003E {\r\n record[id] = true;\r\n });\r\n });\r\n });\r\n return record;\r\n }, {});\r\n}\r\n\r\ncreateRecordFromIdsReduce(maConstante)","IsDeferred":false}]}