Docker stats format?

All,

New docker user here. So there may be a better solution to what I am doing. I am using docker stats and scripting out some of the values into a monitoring solution we have.

However it seems the “docker stats” logs out inconsistently. For example sometimes in bytes, sometimes in Megs etc.

e.g.
MEM USAGE / LIMIT
0 B / 0 B
4.162 MB / 2.972 GB

Is there a option or tool I am missing to get value from various commands? I saw the --format option on some of them and that works great. But I don’t see that on the stats command. Perhaps a flag I a missing for value output?