79561424

Date: 2025-04-08 07:27:22
Score: 1
Natty:
Report link
<table>
      <tbody>
        {Array.from({ length: Math.ceil(data.length / 2) }).map((_, i) => (
          <tr key={i}>
            <td>
              <p>
                ID <b>{i * 2 + 1}</b>:<br />
                Location # <b>{data[i * 2]?.Location}</b>
                <br />
                Seal # <b>{data[i * 2]?.Seal}</b>
              </p>
            </td>
            <td>
              {data[i * 2 + 1] && (
                <p>
                  ID <b>{i * 2 + 2}</b>:<br />
                  Location # <b>{data[i * 2 + 1]?.Location}</b>
                  <br />
                  Seal # <b>{data[i * 2 + 1]?.Seal}</b>
                </p>
              )}
            </td>
          </tr>
        ))}
      </tbody>
    </table>

Inside each row, add 2 <td> and loop for every 2 elements.
This way you will be able to show data the way you mentioned

Output:
enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Syed Faraz Hasan