I work on angular 7
I need to loop over location and get all loc values from locations array
- Locations":
- [{"Loc":2937,"Fab":"Assembly"},
- {"Loc":27746,"Fab":"FAB"},{"Loc":27751,"Fab":"Assembly"},
- {"Loc":2931,"Fab":"Assembly"},{"Loc":27801,"Fab":"FAB"},
- {"Loc":27739,"Fab":"Assembly"},{"Loc":27775,"Fab":"FAB"},
- {"Loc":27789,"Fab":"FAB"}]
- result returned
- 2937
- 27746
- 27739
- 27789
2937
27746
27739
27789
to access first item
- this.LocationId= this.data.Locations[0]['Loc'];
How to do that please
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Veerendra AnnigerePosted Dec 29, 2019, 9:48 AM
Veerendra AnnigerePosted Dec 29, 2019, 7:56 AM