if currentElementName == "SendResult" {
var newString = string.replacingOccurrences(of: "[", with: "")
newString = newString.replacingOccurrences(of: "]", with: "")
print("string= \(newString)")
let data = newString.data(using: .utf8)
do{
let j = try JSONSerialization.jsonObject(with: data!, options: JSONSerialization.ReadingOptions.mutableContainers)
print(j)
//Store response in NSDictionary for easy access
let dict = j as? NSDictionary
let amount = "\(dict!["Amount"]!)"
print(amount)
}catch {
print(error)
}
}
}
var newString = string.replacingOccurrences(of: "[", with: "")
newString = newString.replacingOccurrences(of: "]", with: "")
print("string= \(newString)")
let data = newString.data(using: .utf8)
do{
let j = try JSONSerialization.jsonObject(with: data!, options: JSONSerialization.ReadingOptions.mutableContainers)
print(j)
//Store response in NSDictionary for easy access
let dict = j as? NSDictionary
let amount = "\(dict!["Amount"]!)"
print(amount)
}catch {
print(error)
}
}
}
Sign up here with your email
ConversionConversion EmoticonEmoticon