How do I iterate through list of class properties and get the values of each (only the properties and not the functions)
class Person{
name:string;
age:number;
address:Address;
getObjectProperties(){
let json = {};
// I need to get the name, age and address in this JSON and return it
// how to do this dynamically, rather than getting one by one
// like json["name"] = this.name;
return json;
}
}
Please help.