How to store values of loc[0].trim and loc[1].trim on two variables 
latitude and longitude 
and what type of two variables ?
 values of loc[0] and loc[1 already success retrieve values 
i need to store every loc on two variables after finish loop
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
      
             
      

   });  
latitude= result of loc[0].trim after loop finish
longitude= result of loc[1].trim after loop finish
and what datatype assigned to two variables ?
 
 


-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/51022434-81af-4f98-9a47-f9bac89a70ed%40googlegroups.com.

Reply via email to