The correct stability order of the following resonance structures is
Structure with atoms having complete octet are more stable than those with incomplete octet. Thus I and III are more stable than II and IV.
Among these groups structures where the most electronegative atom have -ve charge is more stable. Among I and III, III is unstable as carbon which is less electronegative than N has -ve charge, whereas in I, N has the -ve charge. Similarly IV is less stable compared to II. So correct order is