Does someone knows how to convert the alamofire response of type () to a string ?
Here is an exemple of request :
func fetch(jan: String) { AF.request("https://shopping.yahooapis.jp/ShoppingWebService/V1/json/itemSearch?appid=XXXXXX&jan=\(jan)&hits=50").responseDecodable(of: Welcome.self)
{ response in
print("\(response.value?.resultSet.the0.result.the1?.price.value ?? "is nil")")
}
}
I would like that the function fetch() returns a string instead of a () object in order to display it later in a displayLabel.text for example.
Thank you in advance !