I have problem that I gotta make table which is divided on half at the beginning shows left side and middle Ids, then after receiving data from api request, it compares these two arrays and mark differences on red. Actually it works partly good, so it map through 2 arrays, and if it finds any differences then color it on red, the problem is that it also duplicates all elements and in the end table has double same rows several times. I understand that it is because I'm mapping array inside another mapping but I don't have idea how to solve this problem. Basic idea is: Show all results without duplication, and mark differences. I know how to mark differences but totally have no idea how to not show duplicates Here I post minimized code for easier reading Thanks!
const applicationsTable = (classes, current, compared) => current.configuration.applications.map((el, i) => compared && compared.configuration.applications.map((comparedEl, i) => ( <TableRow key={i}> <StyledFiledTableCell> <Typography variant="body2"> {el.version} </Typography> </StyledFiledTableCell> <StyledFiledTableCell colSpan="5"> <Typography variant="body2">{el.aid}</Typography> </StyledFiledTableCell> {el.aid == comparedEl.aid ? ( <> <StyledFiledTableCell> <Typography variant="body2"> {comparedEl.version} </Typography> </StyledFiledTableCell> </> ) : ( <StyledFiledTableCell colSpan="5" /> )} </TableRow> )) ) here I post also photo of my problem, as you can see, elements in table are duplicated 
and here is example of my compared and current data:
const current.configuration.applications = [ { aid: "E82B0601040181C31F0201", lifeCycle: "SELECTABLE", version: null }, { aid: "E82B0601040181C31F027F0301", lifeCycle: "SELECTABLE", version: null }, { aid: "D2760001725041636301", lifeCycle: "SELECTABLE", version: null }, { aid: "D276000172536F434D01", lifeCycle: "SELECTABLE", version: null }, ] const compared.configuration.applications = [ { aid: "E82B0601040181C31F0201", lifeCycle: "SELECTABLE", version: "03.02" }, { aid: "D276000172536F434D01", lifeCycle: "SELECTABLE", version: "02.07" }, ]
uniqmethodaidvalue, and show them on a table?versionfrom another array to the left array? Let me rephrase your intention: you want to displaycurrentlist on the left hand side of the table, and on the right hand side, find theversionvalue fromcomparedlist, am I right?