Is there a way to programmatically build a JSON string? The desired outcome should resemble the following:
var myParamsJson = {first_name: "Bob", last_name: "Smith" };
Instead of constructing the entire object at once, I would prefer adding parameters one by one. For arrays, I typically go about it like this:
var myParamsArray = [];
myParamsArray["first_name"] = "Bob";
myParamsArray["last_name"] = "Smith";
I'm open to even creating an array first and then converting it into JSON format.