Groovy
Retrieve the first object (index [0]) among all objects attached to this page and class XWikiComments
com.xpn.xwiki.api.Object@8b4afc0
Retrieve all objects attached to this page and of class XWikiComments
[com.xpn.xwiki.api.Object@12310d26, com.xpn.xwiki.api.Object@5256431e, com.xpn.xwiki.api.Object@1d5090cd, com.xpn.xwiki.api.Object@145291c4, com.xpn.xwiki.api.Object@38dfe548, com.xpn.xwiki.api.Object@7345f723, com.xpn.xwiki.api.Object@766455f4, com.xpn.xwiki.api.Object@354742e5, com.xpn.xwiki.api.Object@5978e3b6]
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