storing form data to json : Hi I am new to Frontend web dev. I wrote a code for a sign up form. I want to add the values of email id and password to JSON file in the form of array objects.

Here is my html file.

    <!DOCTYPE html>
    
    <head>
        <link rel="stylesheet" type="text/css" href="style.css">
        <meta name="robots" content="noindex, nofollow" charset="UTF-8">
    
    </head>
    
    <body>
    
      <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.3.min.js"></script>
      <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.0/jquery.validate.min.js"></script>
      <script type="text/javascript" src="jQuery-UI.js"></script>
      <script src="validate.js"></script>
    
      <form id="myform" enctype="application/json">
        <div class="container-form">
          <fieldset>
              <legend>Sign up</legend>
    
              <label for="username">User Name</label><br>
              <input type="text" name="username[]" id="username" placeholder="Your name" minlength="2" required=""><br><br>
    
              <label for="contact">Contact</label><br>
              <input name="contact" type="number" id="contact" placeholder="Phone Number" >
              <br><br>
              <label for="emailid">Email id</label><br>
              <input type="email" name="emailid[]" id="email" pattern="[^@]+@[^@]+\.[a-zA-Z]{2,6}" placeholder="Enter email id" required=""><br><br>
    
              <label for="password">Password</label><br>
              <input type="password" name="password[]" id="password" placeholder="Enter password" required="" minlength="6"><br><br>
    
              <label for="password">Confirm Password</label><br>
              <input type="password" name="cpassword" id="cpassword" placeholder="Confirm Password"><br><br>
    
              <button type="submit" name="register" id="register" value="Submit">Submit</button>
              <button type="reset" value="Clear">Clear</button>
              <div id="result">
              </div>
          </fieldset>
        </div>
      </form>
    </body>

please help me out, if possible send the code instead of link to some website. Thanks. And also, do I need to install files to setup JSON?