I inserted JSON data into an observable array. My goal is to extract only the address from ShowData, specifically as a string value based on its position.
ShowData.ts:
class ShowData{
constructor(public id:number, public name:string, public address:string, public code:string) {
}
}
ts file:
private arrList: ObservableArray<ShowData> = new ObservableArray<ShowData>();
openData(pos : number){ --->listview item position
let getValue: any = this.arrList.get(pos); // this is not worked
}
When accessing the arrList based on the listview item position, I need to retrieve only the address value.