{"ScriptPreparationCode":null,"TestCases":[{"Name":"Map","Code":"let prices = {\r\n banana: 1,\r\n orange: 2,\r\n meat: 4,\r\n};\r\nlet doublePrices = Object.fromEntries(\r\n // convert prices to array, map each key/value pair into another pair\r\n // and then fromEntries gives back the object\r\n Object.entries(prices).map(entry =\u003E [entry[0], entry[1] * 2])\r\n);","IsDeferred":false},{"Name":"Entries with array","Code":"let prices = {\r\n banana: 1,\r\n orange: 2,\r\n meat: 4,\r\n};\r\nlet doublePrices = {}\r\nfor (const [key, value] of Object.entries(prices)) {\r\n doublePrices[key] = value\r\n}","IsDeferred":false},{"Name":"Entries no array","Code":"let prices = {\r\n banana: 1,\r\n orange: 2,\r\n meat: 4,\r\n};\r\nlet doublePrices = {}\r\nObject.entries(prices).forEach((price) =\u003E {\r\n doublePrices[price[0]] = price[1]\r\n})","IsDeferred":false}]}