Copying and pasting one inputs value into other input with the same name
Why not at least save the intermediate to avoid rerunning that:

$(document).on('click', '.--copy', function () {
    var obj = $(this).closest('div').find('input');
    var input_name = obj.attr('name').split('-')[0];
    $('input[name^=' + input_name + ']').val(obj.val());
});