Thanks rraghvani for the example , I was able to achieve the same by injecting below code
in axeScript.textContent as well and see results in console. But even i was not able to return the object so that it can be used later to generate some html results or print the results in testcomplete log.
Hence tried the previously shared approach where i am getting type mismatch error
Will try to retrieve the object, if i get some solution will share the same . Thanks!