We study the connection between the Muckenhoupt Ap weights and bounded mean oscillation (BMO) for general bases for ℝd. New classes of bases are introduced that allow for several deep results on the Muckenhoupt weights–BMO connection to hold in a very general form. The John–Nirenberg type inequality and its consequences are valid for the new class of Calderón–Zygmund bases which includes cubes in ℝd, but also the basis of rectangles in ℝd. Of particular interest to us is the Garnett–Jones theorem on the BMO distance, which is valid for cubes. We prove that the theorem is equivalent to the newly introduced A2-decomposition property of bases. Several sufficient conditions for the theorem to hold are analysed as well. However, the question whether the theorem fully holds for rectangles remains open.