I'm in the process of designing an interface for my object. Here is the data structure of the object:
{
"isLoaded": true,
"items": {
"0": {
"name": "Mark",
"age": "40"
},
"1": {
"name": "Alex",
"age": "41"
},
"2": {
"name": "Foo",
"age": "42"
},
}
}
This is what the interface I have created looks like:
interface Items {
"name": string;
"age": string;
}
interface ItemData {
"isLoaded": boolean;
"items" : Items;
}
Would you say this is the correct method to create an interface for the above data structure?