I'm trying to access an API using Angular that returns an array with dates as indexes.
After attempting to create a model, I encountered some issues. How should I modify it?
This is what the API response looks like:
{
"Information": {
"Created": "2019-04-25",
"Version": "1.2"
},
"Files": {
"2019-04-26": {
'name': 'file1',
'size': 5,
},
"2019-04-25": {
'name': 'file2',
'size': 3,
},
...
}
}
My current model is structured as follows:
export class Model {
'Information': {
'Created': String,
'Version': String,
};
Files: [
{
'Date': String,
'name': String,
'size': number,
}
];
}