Dymanic POST key in jQuery data
<pre><code>var type = $(this).attr("data-type");
var typeId = $(this).attr("data-value");

if(type=="category") var typeVar="cat";
else if(type=="subcategory") var typeVar="subcat";

$.ajax({
    url: 'admin-catalog/next',
    type: 'POST',
    dataType: 'json',
    data: {typeVar: typeId, limit: 9},
    success: newGalleryProducts
});
</code></pre>

<p>The key 'typeVar' in my 'data' key needs to be dynamic, i.e. it should not post 'typeVar' as the key, it should post either 'cat' or 'subcat'.</p>

<p>Anybody know how to do this?</p>
