how to decoder this JSON swift4 [on hold]











up vote
-8
down vote

favorite












{
"src_1DWmQHHj9Rng7qOhOUW382Dz": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": true
},
"src_1DWnwZHj9Rng7qOhyurpV0bY": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": false
},
"selectedCard": {
"last4": "src_1DWmQHHj9Rng7qOhOUW382Dz"
}
}









share|improve this question















put on hold as too broad by Dávid Pásztor, Moritz, gnat, greg-449, Umair 2 days ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.















  • show your attempt and explain the problem. This just sounds like a 'do my job for me' post so far
    – Scriptable
    2 days ago










  • i created a struct like this :
    – Walid Nakbi
    2 days ago










  • struct Params : Decodable{ var threeDs : Bool var brand : String var last4 : String var selected : Bool }
    – Walid Nakbi
    2 days ago










  • this is my error :keyNotFound(CodingKeys(stringValue: "threeDs", intValue: nil), Swift.DecodingError.Context(codingPath: [_DictionaryCodingKey(stringValue: "selectedCard", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: "threeDs", intValue: nil) ("threeDs").", underlyingError: nil))
    – Walid Nakbi
    2 days ago










  • i am using cloud function firebase to get data :
    – Walid Nakbi
    2 days ago















up vote
-8
down vote

favorite












{
"src_1DWmQHHj9Rng7qOhOUW382Dz": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": true
},
"src_1DWnwZHj9Rng7qOhyurpV0bY": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": false
},
"selectedCard": {
"last4": "src_1DWmQHHj9Rng7qOhOUW382Dz"
}
}









share|improve this question















put on hold as too broad by Dávid Pásztor, Moritz, gnat, greg-449, Umair 2 days ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.















  • show your attempt and explain the problem. This just sounds like a 'do my job for me' post so far
    – Scriptable
    2 days ago










  • i created a struct like this :
    – Walid Nakbi
    2 days ago










  • struct Params : Decodable{ var threeDs : Bool var brand : String var last4 : String var selected : Bool }
    – Walid Nakbi
    2 days ago










  • this is my error :keyNotFound(CodingKeys(stringValue: "threeDs", intValue: nil), Swift.DecodingError.Context(codingPath: [_DictionaryCodingKey(stringValue: "selectedCard", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: "threeDs", intValue: nil) ("threeDs").", underlyingError: nil))
    – Walid Nakbi
    2 days ago










  • i am using cloud function firebase to get data :
    – Walid Nakbi
    2 days ago













up vote
-8
down vote

favorite









up vote
-8
down vote

favorite











{
"src_1DWmQHHj9Rng7qOhOUW382Dz": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": true
},
"src_1DWnwZHj9Rng7qOhyurpV0bY": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": false
},
"selectedCard": {
"last4": "src_1DWmQHHj9Rng7qOhOUW382Dz"
}
}









share|improve this question















{
"src_1DWmQHHj9Rng7qOhOUW382Dz": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": true
},
"src_1DWnwZHj9Rng7qOhyurpV0bY": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": false
},
"selectedCard": {
"last4": "src_1DWmQHHj9Rng7qOhOUW382Dz"
}
}






ios swift jsondecoder






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago









Scriptable

12k43253




12k43253










asked 2 days ago









Walid Nakbi

13




13




put on hold as too broad by Dávid Pásztor, Moritz, gnat, greg-449, Umair 2 days ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






put on hold as too broad by Dávid Pásztor, Moritz, gnat, greg-449, Umair 2 days ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • show your attempt and explain the problem. This just sounds like a 'do my job for me' post so far
    – Scriptable
    2 days ago










  • i created a struct like this :
    – Walid Nakbi
    2 days ago










  • struct Params : Decodable{ var threeDs : Bool var brand : String var last4 : String var selected : Bool }
    – Walid Nakbi
    2 days ago










  • this is my error :keyNotFound(CodingKeys(stringValue: "threeDs", intValue: nil), Swift.DecodingError.Context(codingPath: [_DictionaryCodingKey(stringValue: "selectedCard", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: "threeDs", intValue: nil) ("threeDs").", underlyingError: nil))
    – Walid Nakbi
    2 days ago










  • i am using cloud function firebase to get data :
    – Walid Nakbi
    2 days ago


















  • show your attempt and explain the problem. This just sounds like a 'do my job for me' post so far
    – Scriptable
    2 days ago










  • i created a struct like this :
    – Walid Nakbi
    2 days ago










  • struct Params : Decodable{ var threeDs : Bool var brand : String var last4 : String var selected : Bool }
    – Walid Nakbi
    2 days ago










  • this is my error :keyNotFound(CodingKeys(stringValue: "threeDs", intValue: nil), Swift.DecodingError.Context(codingPath: [_DictionaryCodingKey(stringValue: "selectedCard", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: "threeDs", intValue: nil) ("threeDs").", underlyingError: nil))
    – Walid Nakbi
    2 days ago










  • i am using cloud function firebase to get data :
    – Walid Nakbi
    2 days ago
















show your attempt and explain the problem. This just sounds like a 'do my job for me' post so far
– Scriptable
2 days ago




show your attempt and explain the problem. This just sounds like a 'do my job for me' post so far
– Scriptable
2 days ago












i created a struct like this :
– Walid Nakbi
2 days ago




i created a struct like this :
– Walid Nakbi
2 days ago












struct Params : Decodable{ var threeDs : Bool var brand : String var last4 : String var selected : Bool }
– Walid Nakbi
2 days ago




struct Params : Decodable{ var threeDs : Bool var brand : String var last4 : String var selected : Bool }
– Walid Nakbi
2 days ago












this is my error :keyNotFound(CodingKeys(stringValue: "threeDs", intValue: nil), Swift.DecodingError.Context(codingPath: [_DictionaryCodingKey(stringValue: "selectedCard", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: "threeDs", intValue: nil) ("threeDs").", underlyingError: nil))
– Walid Nakbi
2 days ago




this is my error :keyNotFound(CodingKeys(stringValue: "threeDs", intValue: nil), Swift.DecodingError.Context(codingPath: [_DictionaryCodingKey(stringValue: "selectedCard", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: "threeDs", intValue: nil) ("threeDs").", underlyingError: nil))
– Walid Nakbi
2 days ago












i am using cloud function firebase to get data :
– Walid Nakbi
2 days ago




i am using cloud function firebase to get data :
– Walid Nakbi
2 days ago

















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Volksrepublik China

How to test boost logger output in unit testing?

Write to the output between two pipeline