How to access complex object in jquery
<p>The beans are defined as,</p>

<pre><code>class A
{
   String id;
}

class B
{
    A a;
    String name;
}
</code></pre>

<p>From the controller class, an object of B is returned, I can access name but not a.</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function(){
  $("#name").change(function(){
      $.post('test.htm',{name: $("#name").val()},function(data){
                  alert(data.name);
                  alert(data.a.id);
          });
  });
});
&lt;/script&gt;
</code></pre>

<p>How can I access attributes of class A in the post function?</p>
