title: create a dictionary contains Array and Dictionary in swift 4
body: <p>I just want to create an API JSON Structure. The following are the post body keys and objects. Are there any methods like object with keys and values similar to Objective C in Swift 4? </p>
  
  <pre><code>{
      "name": "switch 1",
      "type": "Switch",
      "gatewayId":515,
      "serialKey": "98:07:2D:48:D3:56",
      "noOfGangs": 4,
      "equipments": [
          {
              "name": "light",
              "type": "Light",
              "port": "1"
          },
          {
              "name": "television",
              "type": "Television",
              "port": "3"
          }
      ]
  }
  </code></pre>