I have forms with inputs of hidden and visible like below.In this example I want to serialize only name=\'country\' which is not hidden
Here is another possible solution with a demo.
var notHidden = $('#finalform > :not(input[type=hidden])').serializeArray(); $('#itemsSerializedCount').text($(notHidden).length)
Here, the input control which is not hidden is serialized.