SpreadsheetView icon indicating copy to clipboard operation
SpreadsheetView copied to clipboard

Struct data to string

Open AMBIENTE1 opened this issue 8 months ago • 0 comments

Hi there, please, If I have data in struct like this:

var ucetPlatby = [struct_ucetPlatby]()

 struct struct_ucetPlatby: Codable {
        let id: Int
        let trasaid: Int
        let cena: Decimal     
        }

//print: [Keshu.UzavreneUcty.struct_ucetPlatby(id: 1, trasaid: 1, cena: 67), Keshu.UzavreneUcty.struct_ucetPlatby(id: 2, trasaid: 2, cena: 134), Keshu.UzavreneUcty.struct_ucetPlatby(id: 3, trasaid: 1, cena: 167.5)]

How can I use them for [[String]]() ??
var data = [[String]]()
cell.label.text = data[indexPath.row - 1][indexPath.column]

Header I have solved.

AMBIENTE1 avatar Jun 04 '24 22:06 AMBIENTE1