{"ScriptPreparationCode":"DATA = Array.from({length:10}, (_, idx) =\u003E ({\r\n idx, \r\n containers: Array.from({length: 10}, (_, container) =\u003E ({ title: \u0027hello\u0027, container }))\r\n}))","TestCases":[{"Name":"reduce\u002Bconcat\u002BforEach","Code":"DATA\r\n .reduce((prev, cur) =\u003E prev.concat(cur.containers), [])\r\n .forEach((element, idx) =\u003E {\r\n Object.assign(element, { idx });\r\n });","IsDeferred":false},{"Name":"for loops","Code":"for (const page of DATA) {\r\n for (let i = 0; i \u003C page.containers.length; \u002B\u002Bi) { \r\n Object.assign(page.containers[i], { idx: i });\r\n }\r\n}","IsDeferred":false}]}