Check out example codes for "ts iterate over interface properties". It will help you in understanding the concepts better.

Code Example 1

class Activity {
    public id: string = '';
    public title: string = '';
    public body: string = '' ;
    public json: Object = {};
}

let activity = new Activity()

const headers: Array<Object> = Object.keys(Activity).map(key => {
    return { text: key, value: key }
});

console.log(JSON.stringify(headers))

Learn ReactJs, React Native from akashmittal.com