document.addEventListener("DOMContentLoaded", function() {
    // Retrieve the rowData from the session
    var rowData = sessionStorage.getItem('rowData');
    var rowDataObj = JSON.parse(rowData);
    // Log the rowDataObj to the console
    console.log(rowDataObj);
    // Unpack each variable
    const infoPersonaMoral = rowDataObj["Info. Persona Moral"];
    document.getElementById("infoPersonaMoral").textContent = infoPersonaMoral;
   // const nombreRepresentante = rowDataObj["Nombre Representante o Apoderado"];
    //document.getElementById("nombreRepresentante").textContent = nombreRepresentante;
    const direccionYEmailRepresentante = rowDataObj["Direcci¨Žn & Email Representante"];
    document.getElementById("direccion_email").textContent = direccionYEmailRepresentante;
    const infoFiscalYCorporativa = rowDataObj["Info. fiscal y corporativa"];
    document.getElementById("infoFiscalYCorporativa").textContent = infoFiscalYCorporativa;
    //const giro = rowDataObj["Giro"];
    //document.getElementById("giro").textContent = giro;
    const rfcRepresentante = rowDataObj["RFC Representante"];
    document.getElementById("rfcRepresentante").textContent = rfcRepresentante;
    //const id = rowDataObj["id"];
    //document.getElementById("id").textContent = id;
    });