{"ScriptPreparationCode":null,"TestCases":[{"Name":"obj","Code":"let data = [40, 30, 20, 10];\r\nlet labels = [\u0022D\u0022, \u0022C\u0022, \u0022B\u0022, \u0022A\u0022];\r\n\r\nconst res = data.map((n, i) =\u003E ({ [labels[i]]: n }))\r\n .sort((a, b) =\u003E Object.values(a)[0] - Object.values(b)[0])\r\n .map(o =\u003E Object.keys(o)[0]);","IsDeferred":false},{"Name":"arr","Code":"let data = [40, 30, 20, 10];\r\nlet labels = [\u0022D\u0022, \u0022C\u0022, \u0022B\u0022, \u0022A\u0022];\r\n\r\nconst res = data.map((n, i) =\u003E [labels[i], n])\r\n .sort((a, b) =\u003E a[1] - b[1])\r\n .map(a =\u003E a[0])","IsDeferred":false}]}