Functionalized layered double hydroxide with nitrogen and sulfur co-decorated carbondots for highly selective and efficient removal of soft Hg2+ and Ag+ ions.