title: How to convert an object to the serialized syntax for data in jquery.ajax function?
body: <p>I have an object that I want to send with my jquery.ajax function but I can't find anything that will convert it to the serialized format I need.</p>
  
  <pre><code>$.ajax({
    type: 'post',
    url: 'www.example.com',
    data: MyObject,
    success: function(data) {
      $('.data').html(data)
    }
  })
  
  MyObject = [
    {
      "UserId": "2",
      "UserLevel": "5",
      "FirstName": "Matthew"
    },
    {
      "UserId": "4",
      "UserLevel": "5",
      "FirstName": "Craig"
    }
  ]
  
  Serialized_format = [
    {
      "name": "UserId",
      "value": "5"
    },
    {
      "name": "UserLevel",
      "value": "4"
    },
    {
      "name": "FirstName",
      "value": "Craig"
    }
  ]
  </code></pre>