title: How to pass a string (list of defaults) to backbone from php using ajax?
body: <p>I am trying to use ajax between php and backbone, I am doing this to be able to extend the list using do_action without the need to modify it directly in backbone.</p>
  
  <p>I can't actually explain but the example below might give you an idea on what I want to achieve..</p>
  
  <pre><code>wp_localize_script( 'main_js', 'custom_ajax', array(
  'list_model_defaults_from_php'  =&gt; function_for_model_defaults;
  );
  
  function function_for_model_defaults(){
  echo"
  { 'title' : 'First Title', 'field' : 'first_field'},
  { 'title' : 'Second Title', 'field' : 'second_field'},
  { 'title' : 'Third Title', 'field' : 'third_field'}
  ";
  }
  </code></pre>
  
  <p>and then in backbone  all I need to do is:</p>
  
  <pre><code>MDefaults.Layout = Backbone.Model.extend( {
          defaults: {modules : [custom_ajax.list_model_defaults_from_php],
              views : []},
  </code></pre>
  
  <p>Is this logical?</p>