flatten.xbalresult function

Flattens xBalance output.