Is there any way to fetch data (by id) at obj obj ?
example:
hello(){
this._shelveService.getShelveDataById(this.route.snapshot.params.id).subscribe(data => {
console.log(data);
this._shelveForm = this.fb.group({
id_shelve:[data['id_shelve']],
description_shelve:[data['description_shelve']],
war_id:this.fb.group({
id_warehouse: [data['war_id.id_warehouse']]
})
})
})
}
how to get the value of id_warehouse ?
I can get the value id_shelve and description_shelve with the hello() function but if I type:
war_id:this.fb.group({
id_warehouse: [data['war_id']]
i get as a result Obj Ojb
json :
{
"id_shelve": 1,
"description_shelve": "Περιγράφη Ραφίου!!!",
"war_id": {
"id_warehouse": 1,
"description_warehouse": "Περιγράφη Αποθήκης!!!"
}
}
Any help;