{"ScriptPreparationCode":null,"TestCases":[{"Name":"Run with For \u002B Array.push","Code":"const dataset = [\r\n { id: 1, name: \u0027A\u0027 },\r\n { id: 2, name: \u0027B\u0027 },\r\n { id: 3, name: \u0027C\u0027 },\r\n { id: 4, name: \u0027D\u0027 },\r\n { id: 5, name: \u0027E\u0027 },\r\n { id: 6, name: \u0027F\u0027 },\r\n { id: 7, name: \u0027G\u0027 },\r\n { id: 8, name: \u0027H\u0027 },\r\n { id: 9, name: \u0027I\u0027 },\r\n { id: 10, name: \u0027J\u0027 },\r\n]\r\nconst list = []\r\n\r\nfor (let i = 0; i \u003C dataset.length; i\u002B\u002B) {\r\n\tlist.push({\r\n \tid: dataset[i].id,\r\n \tname: dataset[i].name,\r\n \tincrement: i\r\n })\r\n}\r\n","IsDeferred":false},{"Name":"Run with Map","Code":"const dataset = [\r\n { id: 1, name: \u0027A\u0027 },\r\n { id: 2, name: \u0027B\u0027 },\r\n { id: 3, name: \u0027C\u0027 },\r\n { id: 4, name: \u0027D\u0027 },\r\n { id: 5, name: \u0027E\u0027 },\r\n { id: 6, name: \u0027F\u0027 },\r\n { id: 7, name: \u0027G\u0027 },\r\n { id: 8, name: \u0027H\u0027 },\r\n { id: 9, name: \u0027I\u0027 },\r\n { id: 10, name: \u0027J\u0027 },\r\n]\r\nconst list = dataset.map((d, i) =\u003E ({\r\n\tid: d.id,\r\n name: d.name,\r\n increment: i\r\n}))","IsDeferred":false}]}