How to store values of loc[0] and loc[1] on two variables latitude and longtude
and what type of two variables ?
- this.partDetailsService.getLocationData(locationArr).subscribe(res => {
- console.log(res);
- res.forEach((item, index) => {
- let dataLocation = res[index]['_source']['GPS1'];
- console.log(dataLocation);
- let loc = dataLocation.split(',');
- console.log("After");
- success
- success
- success
-
-
- });
latitude= result of loc[0].trim after loop finish
longtude= result of loc[1].trim after loop finish
and what datatype assigned to two variables ?