Groovy
Retrieve the first object (index [0]) among all objects attached to this page and class XWikiComments
com.xpn.xwiki.api.Object@4f6b1ec2
Retrieve all objects attached to this page and of class XWikiComments
[com.xpn.xwiki.api.Object@29cd0360, com.xpn.xwiki.api.Object@5298a910, com.xpn.xwiki.api.Object@248383cd, com.xpn.xwiki.api.Object@36421a75, com.xpn.xwiki.api.Object@2dd71327, com.xpn.xwiki.api.Object@32a7cf4, com.xpn.xwiki.api.Object@5a7178cb, com.xpn.xwiki.api.Object@4fb185d0, com.xpn.xwiki.api.Object@fc84390]
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