title: how to create json object in ios swift
body: <p>I have 3 arrays when I insert data inside table than that data also add in the array (key, value pair).</p>
  
  <pre><code>var person = ["ABC","XYZ","PQR"]
  var email = ["abc@yahoo.com","xyz@yahoo.com","pqr@yahoo.com"]
  var mobile = ["1234567890","1234567890","1234567890"]
  </code></pre>
  
  <p>My problem is how to create JSON object and data store key value pair.</p>
  
  <p>I want this     </p>
  
  <pre><code>{
      "blogs": [
          {
              "person": "ABC",
              "email": "abc@yahoo.com",
              "contact": "1234567890"
          },
          {
              "person": "XYZ",
              "email": "xyz@yahoo.com",
              "contact": "1234567890"
          },
  {
              "person": "PQR",
              "email": "pqr@yahoo.com",
              "contact": "1234567890"
          }
      ]
  }
  </code></pre>
  
  <p>so that data passes to <code>url()</code></p>
  
  <p>In the action button that adds data in array and table</p>
  
  <pre><code>@IBAction func meeting_info(_ sender: Any) {
  
          var PersonName = person_name.text
          var Email = email_id.text
          var MobileNo = mobile_no.text
  
          if (person_name.text?.isEmpty)! || (email_id.text?.isEmpty)! || (mobile_no.text?.isEmpty)!  {
  
              displayMyAlertMessage(userMessage: "please check field empty or not");
  
          }
  
          else{
  
              person.append(person_name.text!)
              email.append(email_id.text!)
              mobile.append(mobile_no.text!)
  
              meetingTableView.reloadData()
  
          }
  
  
  
      }
  </code></pre>
  
  <p>I want to generate JSON array from person, email and contact in key value pairs</p>