Guest User

Untitled

a guest
Oct 17th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. self.cart = result.value(forKey: "cart") as! NSMutableArray
  2. self.totalsDic = result.value(forKey: "totals") as! NSMutableDictionary
  3. print(self.totalsDic)
  4. // print(self.cart)
  5.  
  6. let total = self.totalsDic.object(forKey: "total") as! NSMutableDictionary
  7. let final = total.object(forKey: "total") as? String
  8. // final = final?.replacingOccurrences(of: "Rs.", with: "")
  9.  
  10.  
  11. let myDouble1 = NumberFormatter().number(from: final!)?.doubleValue
  12. print("My double: (String(describing: myDouble))")
  13. let myDouble2 = Double(final!)
Add Comment
Please, Sign In to add comment