title: How to pass javascript array to and YII action through ajax
body: <p>I'm having a javascript array like</p>
  
  <pre><code>var orderItems={'1':{id:'1',name:'Shirt',qty:'0'},'3':{id:'3',name:'Shoe',qty:'0'}, };
  </code></pre>
  
  <p>I need to pass this array to an action using a ajax button.</p>
  
  <pre><code>$this-&gt;widget('bootstrap.widgets.TbButton', array(
      'label' =&gt; 'Click me',
      'type' =&gt; 'primary',
      'htmlOptions' =&gt; array(
          'data-toggle' =&gt; 'modal',
          'data-target' =&gt; '#myModal',
          'ajax' =&gt; array(
              'type' =&gt; 'POST',
              'url' =&gt; $this-&gt;createUrl('order/AjaxUpdateOrder', 
                                        array('val' =&gt; 'profile')),
              'success' =&gt; 'function(data) { alert(data) }',
          ),
      ),
  ));
  </code></pre>