如何在ajax json中使用动态输入名称变量

For an ajax query together with bootstrap validation, I'm taking the form input as below

var formData = {
                'membername'        : $('input[name=membername]').val(),
                'createddate'       : $('input[name=createddate]').val(),
                'membergroupno'    : $('input[name=membergroupno]').val(),
                'send'              : $('button[name=send]').val()
            };

My problem is the input ID & Name are all dynamic (for eg:, name1, name2,...etc). How can I assign dynamic name to the above or, in a better way rewrite the above piece of code to accommodate the dynamic names/id.

The piece of code is a part of the ajax form submit process. Appreciate if anyone could help.