Question: I am trying to decode this JSON file and read the duration from the JSON file using Swift 4. I am not familiar with this
I am trying to decode this JSON file and read the duration from the JSON file using Swift 4. I am not familiar with this type of file. Please help me decode it. I am mainly looking to decode the duration segment of the code.
{ "destination_addresses" : [ "New York, NY, USA" ], "origin_addresses" : [ "Washington, DC, USA" ], "rows" : [ { "elements" : [ { "distance" : { "text" : "225 mi", "value" : 361715 }, "duration" : { "text" : "3 hours 49 mins", "value" : 13725 }, "status" : "OK" } ] } ], "status" : "OK" }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
