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 i need to return is :
- result returned
- 2937
- 27746
- 27739
- 27789
I need to store all values related to loc to array locations
2937
27746
27739
27789
to access first item
- this.LocationId= this.data.Locations[0]['Loc'];
but what actually need store all values on array related to loc inside locations array?
How to do that please