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");
- console.log(loc); success
- console.log(loc[0].trim()); success
- console.log(loc[1].trim()); success
- });
longtude= result of loc[1].trim after loop finish
and what datatype assigned to two variables ?

ahmed elbarbaryPosted Dec 30, 2019, 7:41 AM
ahmed elbarbaryPosted Dec 30, 2019, 7:14 AM
Piyush PansuriyaPosted Dec 30, 2019, 6:57 AM