I have a dynamically generated HTML table. It varies not only the pure content, but also the column names from case to case.
But one thing is in common between all the tables that may arise - there is one, two or all three of the following column names:
Vorname (first name), Nachname (last name), Name (name)
Now I would like to examine these columns for duplicates. There are, however, a chain that I want to try to follow, clearly demonstrate:
"Check all the values in the column first name, last name, name. If one or two of the column do not exist, it can be ignored, and to work with the existing column or columns (for example, only first name and last name).
Are duplicate entries found in the column, these lines get the CSS property 'background-color: yellow ;.
But duplicate values should only be recognized as such when first and last name of the line are the same or even first name and name. Depending on which columns exist.
A small example:
<table>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
<tr>
<td>John</td>
<td>Mc Doe</td>
</tr>
</table>
-> Since only the first (In this example, the first name column) matches (John), but the second column (Last Name or name) is different, is not to be recognized as a duplicate row.
Unfortunately, I'm still not so fit in JavaScript / jQuery, so I need some help from the experts =)