Creation of JSON array in swift 3

Using SwiftyJson

var jsonArray: JSON = ["parameter": ["key": "paymentType","value": "F"]]

Best I could do with the information you gave. Hardcoding values into something like this isn’t usualy the best idea so I would recommend you go and try learn a bit more about SwiftyJSON which might make working with JSON a bit easier for you.

Leave a Comment