I have a json with key and value as "average_cost_for_two": 20
When I want to show this in UI, I was show as Avg Cost for two: 20 However I cannot convert the value to String to append "Avg Cost for two" since the value in the Json is an Int.
Basically I want to do append to the published var like this
for i in fetch.nearby_restaurants{
DispatchQueue.main.async {
self.datas.append(datatype(id: i.restaurant.id, name: i.restaurant.name, image: i.restaurant.thumb, rating: "Rating: " + i.restaurant.user_rating.aggregate_rating, cost_for_two: "I want to add my string to show in View here " + i.restaurant.average_cost_for_two, webUrl: i.restaurant.url))
}
}
nearby_restaurants has key as "average_cost_for_two": Int
Any help would be greatly appreciated. Thanks!!