EDIT on 2017-08-22 for benjaminion:
Ideally, I want to return bytes[]. See my code and the error with bytes[] at How to return bytes array in Solidity Contract . Benjaminion's first block of code worked with a little bit of modification. I changed my "iterator" function to the following:
function iterator() constant returns (address[],uint256[],uint256[],bytes32[],bytes32[]){
uint256 len = ledger.keys.length;
address[] memory keys = new address[](len);
uint256[] memory values = new uint256[](len);
uint256[] memory values2 = new uint256[](len);
bytes32[] memory newKeys1 = new bytes32[](len);
bytes32[] memory newKeys2 = new bytes32[](len);
for (uint256 i = 0 ; i < len ; i++) {
address key = ledger.keys[i];
keys[i] = key;
values[i] = ledger.maps[key];
values2[i] = token.balanceOf(key);
bytes memory sha = ledger.newKeys[i];
bytes32 half1;
bytes32 half2;
assembly {
half1 := mload(add(sha,0x20))
half2 := mload(add(sha,0x40))
}
newKeys1[i] = half1;
newKeys2[i] = half2;
}
return (keys,values,values2,newKeys1,newKeys2);
}