I have a function in my smart contract where I am trying to return some data that has been stored in the blockchain,
function showOrg(address org) external view returns(uint international_securities_identifier, string memory organization_name, bool hasActivityStatus, string memory businessClassifier, string memory RegisteredAddress, string memory isDomiciledIn, bool sanStatus){
require(orgs[org].admins[msg.sender] == true, "You are not authorized to view this data!");
return(orgs[org].international_securities_identifier, orgs[org].organization_name, orgs[org].hasActivityStatus, orgs[org].businessClassifier, orgs[org].RegisteredAddress, orgs[org].isDomiciledIn, orgs[org].sanStatus);
}
I am using the following to call this function,
var result = AMLContract.methods.showOrg('0xCe37A39e3EaB674572EDd4b37f33841774750b2F').send({from: contractAddress})
console.log(result);
However, what I keep getting is a Promise object, is there any way that I can view the actual data? Or is my approach wrong?