Groovy
Retrieve the first object (index [0]) among all objects attached to this page and class XWikiComments
com.xpn.xwiki.api.Object@69cc6cef
Retrieve all objects attached to this page and of class XWikiComments
[com.xpn.xwiki.api.Object@234b8452, com.xpn.xwiki.api.Object@1742a83e, com.xpn.xwiki.api.Object@19338a60, com.xpn.xwiki.api.Object@6c1b18d, com.xpn.xwiki.api.Object@7b539cdf, com.xpn.xwiki.api.Object@2e6033ba, com.xpn.xwiki.api.Object@2de4101f, com.xpn.xwiki.api.Object@4f4d839f, com.xpn.xwiki.api.Object@3923593f]
Retrieve the author property of all objects attached to this page and of class XWikiComments
println objsAuthors
[XWiki.RicardoRodriguezFernandez, XWiki.RicardoRodriguezFernandez, XWiki.RicardoRodriguezFernandez, XWiki.RicardoRodriguezFernandez, XWiki.IsabelListaGarcia, Anonymous, XWiki.YolandaMariaListeMartinez, XWiki.RicardoRodriguezFernandez, XWiki.RicardoRodriguezFernandez]
objsAuthor = doc.getObjects('XWiki.XWikiComments')[2].author
println objs[0].author