I have this object:
var a = {
"1":{"topicId":1,
"subTopicId":1,
"topicName":"x",
"subTopicName":"x"},
"2":{"topicId":1,
"subTopicId":2,
"topicName":"x",
"subTopicName":"x"},
"62":{"topicId":10,
"subTopicId":62,
"topicName":"x",
"subTopicName":"x"}
}
I realize I can define the inside objects like this:
interface IData {
topicId: number;
subTopicId: number;
topicName: string;
subTopicName; string;
}
But is there a way that I can define the whole objects which can have any number of IData objects?