I want send property model, example i already selected data from table have a model JSON array { a: string, b: object, c:string} but i want to send only property c.
this is my function
public onApprove(mf) {
if (mf === null || mf.undefined) return;
if (!this.btnControl) { return; }
this.btnControl = false;
let data: Array<string> = [];
const approvalLeader = new ApprovalL1Model();
data = mf.data.filter(f => f.isSelector == true);
data.push(approvalLeader.groupId);
this.approvalLeaderService.approve(data)
.subscribe(
s => {
},
e => {
this.btnControl = true;
this.alertService.error(e.status, e.statusText, e._body);
});
this.getData();
console.log(data);
this.btnControl = true;
this.alertService.success('Booking Approved');
}
I already try but my data.push value was undefined, any solution?
cpass it on server by storing in a new array(temp)