Virajsinh

FormData Get in Object Kye Value Pair in jQuery

Jan 21st, 2022 (edited)
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.13 KB | None | 0 0
  1. var formData = $('#op_reg_form_1').serializeArray().reduce(function(obj, item) {
  2.     obj[item.name] = item.value;
  3.     return obj;
  4. }, {});
Add Comment
Please, Sign In to add comment