title: To create key value pairs according to user input in an array in swift
body: <p>I need to create an array of key-value pairs to a key <code>"availabilities"</code> according to user inputs in the following format to post the data. Confused about how to do that. </p>
  
  <pre><code>"availabilities": [
      {
          "availabilites_start_time": "6:00",
          "availabilites_end_time": "10:00",
          "availabilites_dayofweek": "1.",
          "availabilites_shift": "Morning"
      }
  ],
  </code></pre>