i have small problem while sending data to API Calls, i have an Array its contains latitude and longitude values in single array, but my API not accepting the Array format because the data in array is in String Format but my API accept only Double Values
here my sample code:
for (var i=0 ; i<startLocationArray.count;i++) {
let dictLatLong = startLocationArray[i] as! NSArray
print("dictLatLong==\(dictLatLong)")
for dict in dictLatLong
{
let arr: NSArray = dict as! NSArray
for subdict in arr
{
let arrLatLong = NSMutableArray()
let str = String(subdict.valueForKey("lng")! as! Double)+", "+String(subdict.valueForKey("lat")! as! Double)
arrLatLong.addObject(str)
self.outputArray.addObject(arrLatLong)
}
}
my OutPut is :
(
"80.2622228, 13.125962"
),
(
"80.2617606, 13.1259684"
),
(
"80.2617484, 13.1229377"
),
(
"80.2592969, 13.1229812"
),
(
"80.2594669, 13.118439"
)
my expected output is :
(
80.2622228, 13.125962
),
(
80.2617606, 13.1259684
),
(
80.2617484, 13.1229377
),
(
80.2592969, 13.1229812
),
(
80.2594669, 13.118439
)
remove Double Quotes from Array or how to Add Double Values into NsmutableArray ?