Q:

Typescript Transform json const to interface type

I want to transform the following const json:
export const iconRegistry = {
  home: {
    ciclogoc: 'cic-c',
    ciclogoi: 'cic-i',
    ciclogont: 'cic-nt'
  },
};

to this interface type:
export interface IconDescription {
key: string;
value: string;
icon?: string;
}

So home should be key, value should be ciclogoc and icon should be cic-c.
This is what I have now but it is not working correctly:
public getIcons(): IconDescription[] {
    let result: IconDescription[] = [];
    for (let key in iconRegistry) {
        result = _.map(iconRegistry, item => {
            let icons: IconDescription[] = [];
            for (let value in item) {
                console.log('KEY:', key, 'VALUE:', value, 'ICON:', item[value]);
                icons.push({ key, value, icon: item[value] });
            }
            return icons;
        });
    }
    return result;
}

A:

So after some help I got it finally right. I iterate over all the icons and then again over all values and push them to IconDescription.
  public getIcon(): IconDescription[] {
    for (let key in iconRegistry) {
        for (let value in iconRegistry[key]) {
            this.icons.push({ key, value, icon: iconRegistry[key][value] });
        }
    }
      return this.icons;
  }

