I am trying to understand the answer to this question. If a negatively charged rod is brought near the knob at the top of the electroscope then the electrons in the electroscope will be pushed to the end with the leaves (the knob will assume a net positive charge). If the aim is to finish with a positively charged electroscope then a grounding wire / finger would have to be applied near the leaf end of the electroscope to give the excess electrons a path to earth.
The given answer does not specify which part of the electroscope is grounded, but since only the knob is accessible, the