I have an object with concrete structure. I want to create another one, with other structure...Something like .map()
const Object: Icon = {
Laughing: {
iconClass: 'emoticon-3',
name: 'Laughing :D',
dataText: ':D',
},
Surprise: {
iconClass: 'emoticon-4',
name: "Surprise, No you di'int' :O",
dataText: ':O',
}
.......
}
and I want to map it to other object structure:
const Object2: Type2 = {
:D: {
iconClass: 'emoticon-3',
name: 'Laughing :D',
},
:O: {
iconClass: 'emoticon-4',
name: "Surprise, No you di'int' :O",
}
.......
}