I have following Solidity code:
pragma solidity ^0.4.18;
contract ContractsRegistry {
address owner;
struct ContractInfo {
bytes32 subject;
bytes32 companyName;
string contactName;
string contactEmail;
string contactPhone;
}
mapping(address => ContractInfo) contractsMap;
address[] addresses;
I want to display full content of the mapping contractsMap
in the webapp. What would be the best approach to achieve this ?
Here are some additional questions:
Is it possible to to convert it to JSON representation somehow ?
Should I use another data structure ?
Is it a regular way of using a smart contract or nobody does it like that ?