How to get the attribute name value of a input tag using jQuery. Please help.
If you're dealing with a single element preferably you should use the id selector as stated on GenericTypeTea answer and get the name like $("#id").attr("name");.
But if you want, as I did when I found this question, a list with all the input names of a specific class (in my example a list with the names of all unchecked checkboxes with .selectable-checkbox class) you could do something like:
var listOfUnchecked = $('.selectable-checkbox:unchecked').toArray().map(x=>x.name);
or
var listOfUnchecked = [];
$('.selectable-checkbox:unchecked').each(function () {
listOfUnchecked.push($(this).attr('name'));
});