ccan not collect form values, and make an object our of it so i can use ajax for submission after stringifying it

ccan not collect form values, and make an object our of it so i can use ajax for submission after stringifying it

Hello guys i really seek you advise and help on the code below.
as i have made a form and am using ajax to submit data collected from the form by jquery into the database, i decided to collect form elements values then create an object with the values, so that i can turn the created object by stringify() function so i can pss the object converted string as a text using the ajax function, and the use php json decode to turn back the string into object in php and then work with it from there to be submitted into database using php… it seems the values are collected without and problem when the submit button is created, the issues comes at creating the object and turning it into a string, can you advise…
below is my code:

  1. $(document).ready(function() {
  2.     /// the beginning of the processing of forms for contents submissions

  3.     var referenceAnnouncement = "#announcement-reference";
  4.     var announcementVisibility = "#announcementVisibility";
  5.     var announcement_description = "#announcement_description";
  6.     var sw_announcement_description = "#sw_announcement_description";
  7.     //var postedby = "#postedby";
  8.     var announcementPriority = "#announcementPriority";
  9.     var submitAnnouncement = "#submitAnnouncement";
  10.     var announcementObj = "#announcementObj";
  11.     /*
  12.     $(announcementVisibility).change(function{
  13.         var announcementVisibilityValue = $(this).val();// fetch the value of selected report type option vale
  14.         if (announcementVisibilityValue == 1) {
  15.         }
  16.         else if (announcementVisibilityValue == 2) {// hide the sections of form with the other types of reports
  17.         
  18.     }// end of the if block to check the type of the report
  19. });// end of the report type click event */



  20.     $(submitAnnouncement).click(function() {

  21.         var referenceValue = $("#announcement-reference").val();
  22.         var announcementnameValue = $("#announcement_title").val();
  23.         var sw_announcement_descriptionyValue = $("#sw_announcement_title").val();
  24.         var categoryValue = $("#announcement_category").val();
  25.         var announcementPriorityValue = $(announcementPriority).val();
  26.         var announcementVisibilityValue = $(announcementVisibility).val();
  27.         var announcement_descriptionValue = $(announcement_description).val();
  28.         var sw_announcement_descriptionValue = $(sw_announcement_description).val();
  29.         //var announcementpostedby  = $(postedby).val();
  30.         //$(announcementObj).val();

  31.         var announcements = {
  32.             name: announcementnameValue,
  33.             jina: sw_announcement_nameValue,
  34.             category: categoryValue,
  35.             kipengele: categoryValue,
  36.             description: announcement_descriptionValue,
  37.             sw_description: sw_announcement_descriptionyValue,
  38.             reference: referenceValue
  39.         };

  40.         var announcementObjectString = JSON.stringify(announcements);
  41.         //$(announcementObj).val(announcementObjectString);
  42.         alert(announcementObjectString);


  43.         /*
  44.          var getData = new FormData();
  45.          getData.append("investment":  getInvestment);
  46.          serverService (get,"POST","php/includes/serverService/submitSubsidiaryA.php", respectedItemOpts);
  47.         
  48.          //alert(announcementObject);*/
  49.     });
  50. });