title: bind JSON properties to a form
body: <p>I have a JSON object and a <code>&lt;form&gt;</code>. If the JSON object has a property whose name matches the name of a form <code>&lt;input&gt;</code> I want the input to display the value of this property. Is there a simple way to do this with JQuery?</p>
  
  <pre><code>var json = {foo: 'foo', bar: 'bar};
  def form = $('#myform');
  
  // something magical that assigns JSON property values to form inputs with matching names
  </code></pre>
  
  <p>The form in question looks something like:</p>
  
  <pre><code>&lt;form id = "#myform" action="/foo/bar/"&gt;
    &lt;input name="foo"/&gt;
    &lt;input name="bar"/&gt;
  &lt;/form&gt;
  </code></pre>