var itemsObj = new Object();
itemsObj.data = "Something";
$.post("somewhere.php", itemsObj, function(data) {}, "html");
Normally, as stated in the API, I'd use { data: "something" } where itemsObj is, but since my object is dynamic and requires a for-loop, I didn't want to get too 'dirty' with a for loop within the data: ... part...
Anyways, the code I wrote above doesn't work. I think maybe I should've apply the JSON.stringify() function on it, correct if I'm wrong?