jQuery How to get Ids and other data from a table row?

I’m working with a form that includes dynamic rows in a table,
and I want to extract the selector IDs and textboxs data from the rows in the table.
I want to collect the IDs of the HTML elements within each row.

You can find javascript below:

var strHiddenTableData = "";
    function StrHiddenTableData(tableId) {
        strHiddenTableData = "";
        $('#orderDetails tr').each(function () {
            var row = $(this);
            row.find("input").each(function () {
                strHiddenTableData += $(this).val() + ",";
            });
            strHiddenTableData += "|";
        });
        if (strHiddenTableData.endsWith("|")) {
            strHiddenTableData = strHiddenTableData.slice(0, -1);
        }
        jQuery('#hiddenTableData').val(strHiddenTableData);
    }

Regards

I expected to learn here.