I'm just wondering if you could help me fix this issue I'm having with assigning an interface from my json file. I am getting the ts error of json file is not assignable to type Data. 'data' is declared as a type of Data in the .ts file.
this.data = '../assets/data.json';
export interface Data {
millers: Miller[];
}
export interface Miller {
name: string;
address: string;
farms: Farm[];
}
export interface Farm {
code: string;
name: string;
harvest: string;
type: string;
paddocks: Paddock[];
}
export interface Paddock {
code: string;
area: string;
owner: string;
}
{
"millers": [
{
"name": "Britney Houston",
"address": "Summit Street Haena",
"farms": [
{
"code": "deserunt840",
"name": "Artiq",
"harvest": "2012-06-26",
"type": "Cane",
"paddocks": [
{
"code": "do318",
"area": 965
},