Closed okla closed 8 years ago
let array = [1, 2, 3] let json = array.toJSON()
How can I get original array from json?
json
P.S. Sorry for flooding issues. Maybe there's a better place for such dumb questions?
You could try:
let array = [1, 2, 3] let json = array.toJSON() let arrayAgain = json.decodedArray(type: Int.self)
The above uses Freddy 3.0.0 syntax, which will be released momentarily.
How can I get original array from
json
?P.S. Sorry for flooding issues. Maybe there's a better place for such dumb questions?