# TypeError: Cannot read property 'call' of undefined

I am trying to read a mapping inside my smart contract that looks like this:

mapping(address => User) public users;


My web3js code looks like this. I am trying to read mapping users inside the smart contract:

var contractAddress='0x3aacc70dced50f8c6c1951f27d505d2ad165b373';
contractInstance.users.call(web3.eth.accounts[0], function(err, result){
if(!err){
}
});


However I get the error like below:

TypeError: Cannot read property 'call' of undefined


Can someone help me resolve this

If that is not fix your problem, you may need to check your .json built by truffle or try to deploy again.