Light shift in a state due to the applied laser in an atomic system vanishes at tune-out wavelengths (λTs). Similarly, differential light shift in a transition vanishes at the magic wavelengths (λmagics). In many of the earlier studies, values of the electric dipole (E1) matrix elements were inferred precisely by combining measurements and calculations of λmagic. Similarly, the λT values of an atomic state can be used to infer the E1 matrix element, as it involves dynamic electric dipole (α) values of only one state whereas the λmagic values require evaluation of α values for two states. However, both the λmagic and λT values depend on angular momenta and their magnetic components (M) of states. Here, we report the λmagic and λT values of many S1/2 and D3/2,5/2 states, and transitions among these states of the Mg+, Ca+, Sr+ and Ba+ ions that are independent of M values. It is possible to infer a large number of E1 matrix elements of the above ions accurately by measuring these values and combining with our calculations.