{"ScriptPreparationCode":"var arr = [{ name: \u0027luna\u0027, id: 3 },{ name: \u0027abc\u0027, id: 4 }, { name: \u0027eee\u0027, id: 3 }]\r\n","TestCases":[{"Name":"map","Code":"const newArr = []\r\nconst temp = arr.map((item, index) =\u003E {\r\n newArr[index] = {label: item.name, id: item.id}\r\n})","IsDeferred":false},{"Name":"foreach","Code":"const newArr = [];\r\n\r\narr.forEach((item, index) =\u003E {\r\n newArr[index] = {label: item.name, id: item.id}\r\n})","IsDeferred":false},{"Name":"for","Code":"const arrLength = arr.length;\r\nconst newArr = [];\r\nfor (let i = 0; i \u003C arrLength; i\u002B\u002B) {\r\nnewArr[i] = {label: arr[i].name, id: arr[i].id}\r\n}\r\n","IsDeferred":false}]}