Upvote:-1

 photoObj.imagePrice = jsonPhoto?["price"] as? Double ?? 0.00 //fixed error

Credit Goes to: stackoverflow.com

Related question with same questions but different answers