how to convert data in object from string in swift code example Example: conert data to string swift let str = String(decoding: data, as: UTF8.self)