title: Using Jquery $getJSON How do I dynamically create data for the [data] parameter after Url param?
body: <p>I have no problems getting the Json to work and parse the json return. I was just wondering how I could build a dynamic "whatever data is" and stick it into [data] to pass my parameters from there and not manually append them to the url. </p>
  
  <p>From jquery website example:</p>
  
  <pre><code>$.getJSON("test.js", { name: "John", time: "2pm" }, function(json){
       alert("JSON Data: " + json.users[3].name);
  });
  </code></pre>
  
  <p>I thought I could build a string ( which doesn't make sense anyway ) and drop it inside the { }, but I obviously don't understand that part.   </p>
  
  <p>name: isn't a string and you can't put a variable in that part, so how would I dynamically put items into whatever [data] is. </p>
  
  <p>UPDATE: Thanks for the answers. Would I be able to remove a parameter name from the object if I didn't find a valid value later on or would I need to destroy it and recreate it? I am using some select boxes to choose things and I may not have something selected so I wouldn't want to pass that parameter name/value.</p>