The nitrate ion is formed by the loss of the hydrogen ion, and so its structure is:
Around the central nitrogen there are 4 pairs of shared electrons, and no remaining lone pair. The original lone pair has now become a bonding pair. Two of those pairs make up a double bond. The double bond unit and the two single bonds arrange themselves as far apart as possible in a trigonal planar arrangement - exactly the same as the carbonate ion.
What is M?