## 3 Results and Discussion
### Electrodialysis Experiments  
The electrochemical behavior of the modified membranes was investigated by electrodialysis using single NaCl and MgCl\({}_{2}\) systems. During the NaCl desalination experiment, 2 g/L NaCl was used as diluate and concentrate compartment, respectively, while it is replaced by 2 g/L MgCl\({}_{2}\) during the MgCl\({}_{2}\) desalination experiment. 1 L 20 g/L Na\({}_{2}\)SO\({}_{4}\) was used as the electrode rinsing solution with a current density of 15.3 mA cm\({}^{-2}\). The conductivity of the diluate compartment decreased with desalination time for both systems (Figure 8). No obvious variation on desalination performance can be observed after surface modification and incorporation of nanoparticles. For ED, constant-current or constant-voltage major can be applied as operating modes. In previous studies using a constant-voltage strategy, the conductivity of the diluate compartment continually decreased. The elevated system resistance, and thus lower current density, retards the transfer of ions through the ion exchange membrane. Since a constant-current system could maintain a stable current, the effect of current density variation on concentration change of the diluate compartment would be expected to be minimized. In order to obtain a better understanding of this specific process, the concentrations of Na\({}^{+}\) and Mg\({}^{2+}\) at 15 min were considered to calculate the cation flux, due to the fact that the voltage of the system would exceed the maximum voltage of the power supply after 15 min. It can be seen from Figure 8c that a reduction of the Na\({}^{+}\) and Mg\({}^{2+}\) ion flux after surface modification  
Figure 7: ZIF-8 effect on electrochemical impedance spectroscopy (EIS) of membrane for NaCl and MgCl\({}_{2}\) solutions. ((**a**) EIS results obtained in NaCl solution; (**b**) EIS results obtained in MgCl\({}_{2}\) solution)is obtained. Conversely, a higher Na\({}^{+}\) transport and a smaller Mg\({}^{2+}\) transport were found after introducing the ZIF-8 nanoparticles. Generally, the increased IEC could facilitate the transport of Na\({}^{+}\) and Mg\({}^{2+}\) transport, however, ZIF-8 under the PA surface layer could hinder the Mg\({}^{2+}\) transport. The results were different from previous results, which were carried out by incorporating Mil53-(Al) nanoparticles [34]. The free diameter of Mil53-(Al) is close to 0.85 nm, which makes it easier to transfer Na\({}^{+}\) and Mg\({}^{2+}\) than ZIF-8. With more ZIF-8 being incorporated into the membrane matrix, both the Na\({}^{+}\) and Mg\({}^{2+}\) transport was increased, which can be explained by the higher IEC and the formation of unselective voids. When compared with the membrane with Mil53-(Al), the interfacial polymerization with ZIF-8 method provides an enhanced IEC and diffusion ability with a lower water uptake. Furthermore, a higher electro-resistance to Mg\({}^{2+}\) ions could impose the membrane with the possibility to separate monovalent ions. The energy consumption that was required during the ED process was also considered (Figure 8d). The energy consumption was found to decrease with increasing ZIF-8 loadings, which confirmed the facilitated migration of cations.