Been looking around haven't find a solution.. Might be a really stupid question (probably) but haven't found a way to access to it.
I have the class Iphone:
export class Iphone{
version: string;
fixes = [
{fixlcdprice:null},
{fixspeakerprice:null}
];
}
then I have an array of Iphone with data
export const IPHONES:Iphone[]=[
{
version:'Iphone 4',
fixes:[
{fixlcdprice:19},
{fixspeakerprice:19}
]
},
{
version:'Iphone 4s',
fixes: [
{fixlcdprice:19},
{fixspeakerprice:29}
]
}
]
trying to access the price of the fixes but I can't.
have tryed
Iphone.fixes[0] <-- returns (object, object)
then tryed
Iphone.fixes[0[0]] <-- returns nothing..
Iphone.fixes.fixlcdprice <-- doesnt work