Groovy
Retrieve the first object (index [0]) among all objects attached to this page and class XWikiComments
com.xpn.xwiki.api.Object@4ab247f4
Retrieve all objects attached to this page and of class XWikiComments
[com.xpn.xwiki.api.Object@62d707ff, com.xpn.xwiki.api.Object@134e290b, com.xpn.xwiki.api.Object@70689b13, com.xpn.xwiki.api.Object@639d360c, com.xpn.xwiki.api.Object@664780eb, com.xpn.xwiki.api.Object@6060f8c2, com.xpn.xwiki.api.Object@7e6bb9fc, com.xpn.xwiki.api.Object@527f903b, com.xpn.xwiki.api.Object@34d63bcd]
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