I want to parse json in swift 4 using codable. I know how to parse json using codable of known keys. But I am unable to parse json with unknown keys. Please help me to solve this issue
I am trying the following object to parse
additionalInfo = (
{
expensesInfo = (
{
"Hotel Expenses" = "426.0";
},
{
"Cab Expenses" = "46.0";
},
{
"Trekking Expenses" = "160.50";
},
{
"Train Fare" = "70.56";
},
{
"Food Cost" = "270.60";
},
{
"Bar Cost" = "448.90";
}
);
}
)
I know only key is "additionalInfo" whatever data is inside this key I don't know. Then how to parse it in swift 4.0
Thanks.