I have a specific JSON response in mind that I am expecting from an API. My goal is to create a user interface for it.
{
items: [
{
identifier: 1,
details: [
{
id: 1001,
perishable: 0
},
{
id: 1002,
perishable: 0
}
]
}
]
}
This is how I am attempting to define the interface, but I am uncertain if I have approached it correctly. Essentially, the response consists of "items", which is an array of objects, and each object contains another array named "details". How should I signify that something is an array of objects?
export interface Items {
identifier: string;
details: Array<any>;
}
Does this align with what I need?