I am storing and returning the struct value by using mapping.
pragma solidity >=0.5.0 <0.7.0; pragma experimental ABIEncoderV2; contract Manage{ struct Policy{ string PolicyID ; } mapping (address => mapping(string => Policy)) private policy; function storePolicy(address insuranceHolder,string memory _PolicyID) public { policy[insuranceHolder][_PolicyID].PolicyID = _PolicyID; } function getPolicy(address insuranceHolder,string memory _PolicyID) public view returns(Policy memory) { return policy[insuranceHolder][_PolicyID]; } }
I am getting a return value like this. 0: tuple(string):_PolicyID I don't want this 0: tuple(string): I want only _PolicyID, how to do that can anyone help me.
I am getting a warning for using pragma experimental ABIEncoderV2; warning: Experimental features are turned on. do not use experimental features on live deployment.
The compiler gives the warning. That means I should only use it for development. That makes no sense to me.