Thank you for your reply and sorry for my delay in response.
I have tried your method but still filed. However, the link shared by you is very useful and I got the solution to my problem from Getting selected glyph data properties via CustomJS - #5 by ianhelle.
Thank you anyway.