title: How to use a variable value as the key name in an ajax data submit?
body: <p>I'm trying to submit some data via Ajax, but one of my key names and its value must be dynamic. This is what I mean:</p>
  
  <pre><code>var ProductName = $('#Product').attr('name'); // #Product is hidden form element
  var ProductID = $('#Product').val();
  $.ajax({
              type: 'post',
              url: 'form/processor/page',
              data: {
                  SomeElement: ItsValue,
                  AnotherElement: ItsValue,
                  ProductName: ProductID // this one must be dynamic
              },
      ....
  </code></pre>
  
  <p>So essentially I want to use the value of the <code>ProductName</code> variable to provide the key name, and <code>ProductID</code> to provide the key's value.</p>
  
  <p>How could I do this?</p>