{"ScriptPreparationCode":null,"TestCases":[{"Name":"Keys","Code":"const test = {\r\n level_id_1: {id: 1},\r\n level_id_2: {id: 2},\r\n level_id_3: {id: 3},\r\n}\r\n\r\nObject.keys(test).map(keys =\u003E {\r\n let a = {};\r\n const keysplit = keys.split(\u0027_\u0027);\r\n const level = keysplit[keysplit.length - 1];\r\n a[\u0060level${level}_id\u0060] = test[keys]?.id;\r\n return a;\r\n })","IsDeferred":false},{"Name":"Entries","Code":"const test = {\r\n level_id_1: {id: 1},\r\n level_id_2: {id: 2},\r\n level_id_3: {id: 3},\r\n}\r\n\r\nObject.entries(test).map(entry =\u003E {\r\n let a = {};\r\n const keysplit = entry[0];\r\n const level = keysplit[keysplit.length - 1];\r\n a[\u0060level${level}_id\u0060] = entry[1]?.id;\r\n return a;\r\n})","IsDeferred":false}]}