var test_list = [] $("[name=contact_user]:checked").each(function () { test_list.push($(this).val()) }); var test_str = JSON.stringify(test_list ); console.log(test_str);