<!DOCTYPE html> <html> <head> <title>Untitled</title> <meta charset="utf-8"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script> $(function () { var a = {}; $("form").serializeArray().map(function (x) { a[x.name] = x.value; }); alert(JSON.stringify(a)) }); </script> </head> <body> <form> <input type="text" class="function1" name="Диаметр" value="1"> <input type="text" class="function2" name="Масса" value="2"> <input type="text" class="function3" name="Размер" value="3"> <input type="text" class="function4" name="Материал" value="4"> <input type="text" class="function5" name="Цвет" value="5"> </form> </body> </html>