title: JQuery ajax post data(json) to laravel, then laravel create data
body: <p>Excuse me, I want get employ value to ajax post, </p>
  
  <p>then laravel controller get data(json) insert to database,</p>
  
  <p>but jquery.map "bruce" is error, How can I do? , Please Help me thanks!</p>
  
  <p>this is json 
  format</p>
  
  <pre><code>{"data":{"bruce":"[{"employ":"bruce"},{"employ":"peter"}]","_token":"UiKUMMZRqTgYv5"}}
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;input type="button" class="btn ahr-button_2 employ" value="bruce"&gt;
  &lt;input type="button" class="btn ahr-button_2 employ" value="peter"&gt;
  &lt;input type="button" class="btn ahr-button_2 employ" value="abcd"&gt;
  &lt;input type="button" class="btn ahr-button_2 employ" value="efgh"&gt;
  &lt;a href="#" class="finish_sumbit"&gt;完了&lt;/a&gt;
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>$('.employ').click(function(){
      $(this).toggleClass('active');
  });
  
  $(".finish_sumbit").click(function(e){
   e.preventDefault();
    var data = $('.employ.active').map(function() {
      return {
        'employ': this.value
      }
    }).get();
  
  $.ajax({
      type: "POST",
      url: "business_a",
      async:false,
      dataType: "json",
      data: {bruce:data,_token:token},
      success: function (data) {
          console.log(data);
      },
      error: function (data) {
          console.log('Error:', data);
  
      }
  });
  
  });
  </code></pre>
  
  <p>laravel route</p>
  
  <pre><code>Route::post('/business_a', 'BusinessController@business_a');
  </code></pre>
  
  <p>laravel controller</p>
  
  <pre><code>public function business_a(Request $request)
      {
          $employ = new Employ;
          $b = $employ::create([
                  'employ' =&gt; $request-&gt;bruce,          
          ]);
       }
  </code></pre>