push and splice is not working here. this is my model. i need this model to build my tables. splice remove everything and push doesn't do anything.
export class Parameter {
constructor(
public asset: string,
public wx: IWx[]
) {
}
}
export interface IWx {
[key: string]: IWxValue;
}
export interface IWxValue {
yellowValue: any;
redValue: any;
}
this is my function
ajouteWx(pIndex: number, wxIndex: number) {
console.log(pIndex);
console.log(wxIndex);
this._parameters[pIndex].wx = this._parameters[pIndex].wx.push({hello: {yellowValue: 5, redValue: 2}});
this._parameters[pIndex].wx = this._parameters[pIndex].wx.splice(wxIndex, 0, {hello: {yellowValue: 5, redValue: 2}});
}