Answer the question
In order to leave comments, you need to log in
How to get the value of an element in Swift?
There is a variable structure
struct Param {
let total_item_id: Int
}
There is an element value
perametr1
▿ 1 elements
▿ [0] : Param
- total_item_id : 60
I write like this: let param2 = (perametr1["total_item_id"] as? NSInteger).stringValue
How to get the value 60 in string form? (I can’t figure it out for 2 hours already)
Answer the question
In order to leave comments, you need to log in
String(parameter1.total_item_id)
Ps in swift is preferable to camelCase for titles
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question