title: Get all checked and unchecked true or false value in array jQuery ajax and submit it to Laravel controller
body: <p>How to give default value to checkbox false and when I checked it give me output true with his name like:<code>(&quot;user_management_create&quot;:true)</code> at the time of form submit if I can't check any checkbox it, also gives false value <code>like(User_management_erite:false)</code></p>
  <p>I want output like this <code>{&quot;dashboard&quot;:true,&quot;user_management_read&quot;:true,&quot;user_management_write&quot;:false&quot;, content_management_read&quot;:false,&quot;content_management_write&quot;:true}</code></p>
  <h1>HTML</h1>
  <pre class="lang-html prettyprint-override"><code>&lt;form id=&quot;kt_modal_add_role_form1&quot;&gt; &lt;tr&gt;
          &lt;!--begin::Label--&gt;
          &lt;td class=&quot;text-gray-800&quot;&gt;Content Management&lt;/td&gt;
          &lt;!--end::Label--&gt;
          &lt;!--begin::Options--&gt;
          &lt;td&gt;
              &lt;!--begin::Wrapper--&gt;
              &lt;div class=&quot;d-flex&quot;&gt;
                  &lt;!--begin::Checkbox--&gt;
                  &lt;label
                          class=&quot;form-check form-check-sm form-check-custom form-check-solid me-5 me-lg-20&quot;&gt;
                      &lt;input class=&quot;form-check-input checkitem&quot;
                             type=&quot;checkbox&quot; value=&quot;&quot;
                             name=&quot;content_management_read&quot;
                             class=&quot;checkitem&quot; /&gt;
                      &lt;span class=&quot;form-check-label&quot;&gt;Read&lt;/span&gt;
                  &lt;/label&gt;
                  &lt;!--end::Checkbox--&gt;
                  &lt;!--begin::Checkbox--&gt;
                  &lt;label
                          class=&quot;form-check form-check-sm form-check-custom form-check-solid me-5 me-lg-20&quot;&gt;
                      &lt;input class=&quot;form-check-input checkitem&quot;
                             type=&quot;checkbox&quot; value=&quot;&quot;
                             name=&quot;content_management_write&quot;
                             class=&quot;checkitem&quot; /&gt;
                      &lt;span class=&quot;form-check-label&quot;&gt;Write&lt;/span&gt;
                  &lt;/label&gt;
                  &lt;!--end::Checkbox--&gt;
                  &lt;!--begin::Checkbox--&gt;
                  &lt;label
                          class=&quot;form-check form-check-sm form-check-custom form-check-solid&quot;&gt;
                      &lt;input class=&quot;form-check-input checkitem&quot;
                             type=&quot;checkbox&quot; value=&quot;&quot;
                             name=&quot;content_management_create&quot;
                             class=&quot;checkitem&quot; /&gt;
                      &lt;span class=&quot;form-check-label&quot;&gt;Create&lt;/span&gt;
                  &lt;/label&gt;
                  &lt;!--end::Checkbox--&gt;
              &lt;/div&gt;
              &lt;!--end::Wrapper--&gt;
          &lt;/td&gt;
          &lt;!--end::Options--&gt;
      &lt;/tr&gt;
  
  </code></pre>