I am working on designing an interface for handling Objects, objects, and arrays of objects.
Here is a sample of the interface:
export interface ErateColumn {
categories:{
[key:string]:column[]
}
}
interface column {
label:string
value:string
}
For instance, consider this sample API response:
{
"categories": {
"Basic Information": [
{ label: "Applicant Type", value: "ApplicantType" },
{ label: "Organization Name", value: "OrganizationName" },
],
"FRN Lineitem": [
{ label: "Monthly_Cost", value: "Monthly_Cost" },
],
"FRN status": [
{ label: "Purpose Type", value: "PurposeType" },
]
}
}