{"ScriptPreparationCode":"var test = Array.from({\r\n length: 10\r\n}, () =\u003E ({\r\n rooms: Array.from({\r\n length: 15\r\n }, () =\u003E ({\r\n room: {\r\n id: Math.floor(Math.random() * 10000)\r\n }\r\n }))\r\n}))","TestCases":[{"Name":"reduce ","Code":"test.reduce(\r\n (acc, page) =\u003E ({\r\n ...acc,\r\n ...page.rooms.reduce(\r\n (acc, item) =\u003E ({\r\n ...acc,\r\n [item.room.id]: item\r\n }),\r\n {}\r\n )\r\n }),\r\n {}\r\n )","IsDeferred":false},{"Name":"flatmap","Code":"Object.fromEntries(\r\n(test.flatMap(page =\u003E page.rooms) ?? []).map(room =\u003E [room.room.id, room])\r\n)","IsDeferred":false}]}