I received the following response from server
"transactionInfo": {
"currencyCode": "MYR",
"total": 472.23,
"roomCurrencyCode": "MYR",
"roomTotal": 472.23
}
but when I am trying to convert using SwiftyJson and map using below code
struct TransactionInfoModel: Codable {
var currencyCode: String
var total: Double
var roomCurrencyCode: String
var roomTotal: Double
}
then I get values like below:
"currencyCode": "MYR",
"total": 472.23000000000002,
"roomCurrencyCode": "MYR",
"roomTotal": 472.23000000000002
Please suggest how to resolve this issue. Thanks in advance.