Separation of metal ions on ion-exchange resin with ethylenediamine functional groups