Using Ethers JS library in javascript code. When calling a solididy function that returns an Uint type, its returning an object with the uint in hex format.
SOLIDITY function
function totalRecords() public view returns (uint256){
return Records.length;
}
ETHERS JS call
CONTRACT.totalRecords().then( _num => { console.log("TOTAL_RECORDS " + _num); });
REPONSE
Object { _hex: "0x0a", _isBigNumber: true }
_hex: "0x0a"
_isBigNumber: true