Groovy
Retrieve the first object (index [0]) among all objects attached to this page and class XWikiComments
com.xpn.xwiki.api.Object@9d01cba
Retrieve all objects attached to this page and of class XWikiComments
[com.xpn.xwiki.api.Object@49d777ae, com.xpn.xwiki.api.Object@60f26661, com.xpn.xwiki.api.Object@4a1f9c00, com.xpn.xwiki.api.Object@613aea04, com.xpn.xwiki.api.Object@62d9de7a, com.xpn.xwiki.api.Object@4d9d4e49, com.xpn.xwiki.api.Object@127ec26e, com.xpn.xwiki.api.Object@400ecd3e, com.xpn.xwiki.api.Object@bc4c24d]
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