Magnetoelectric spectroscopy of Andreev bound states in Josephson quantum dots