{
"title": {
"de-DE": "German",
"fr-FR": "French",
"en-CA": "English"
},
"image": "/tile.jpg",
"url": "/url/to/version"
}
After receiving this JSON data, my model structure is as follows:
export class MyModelStructure {
title: string;
image: string;
url: string;
}
I am looking for the correct approach to include sub-fields for different locales within the 'title' field. Here's what I have in mind:
export class MyModelStructure {
title: string
[
de-DE: string;
fr-FR: string;
en-CA: string;
];
image: string;
url: string;
}