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 razonSocial = rowDataObj["Razón social"];
    document.getElementById("infoPersonaMoral").textContent = razonSocial;
    document.getElementById("razonSocial2").textContent = razonSocial;
    document.getElementById("razonSocial3").textContent = razonSocial;
    const nombreRepresentante = rowDataObj["Nombre Representante"];
    document.getElementById("nombreRepresentante").textContent = nombreRepresentante;
    document.getElementById("nombreRepresentante2").textContent = nombreRepresentante;
    document.getElementById("nombreRepresentante3").textContent = nombreRepresentante;
    const ocupacion = rowDataObj["Ocupación"];
    document.getElementById("ocupacion").textContent = ocupacion;
    const infoFiscal = rowDataObj["Información fiscal"];
    document.getElementById("infoFiscal").textContent = infoFiscal;
    const domicilio = rowDataObj["Domicilio"];
    document.getElementById("domicilio").textContent = domicilio;
    const paginaWeb = rowDataObj["Página Web"];
    document.getElementById("webPage").textContent = paginaWeb;
    //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;
    });