I have an application where I receive data in JSON format. A simplified example:
data {
prop1: "abc",
prop2: 123,
COL_A12: "mydata",
COL_A13: "myotherdata",
}
Where I know upfront that the data will have several prop1 and prop2 property names, but COL_A12 and COL_A13 are generated, so they could've followed other naming (i.e COL_A67).
I enforced an interface like
interface IData {
prop1: string;
prop2: number;
}
But I cannot specify the other property's name in the interface because I don't know the exact names, although they do follow a pattern.
Is there any way to provide a regular expression for the property name's in Typescript?