Groovy
Retrieve the first object (index [0]) among all objects attached to this page and class XWikiComments
com.xpn.xwiki.api.Object@4a904479
Retrieve all objects attached to this page and of class XWikiComments
[com.xpn.xwiki.api.Object@ef22c26, com.xpn.xwiki.api.Object@3d307a74, com.xpn.xwiki.api.Object@39b7750e, com.xpn.xwiki.api.Object@3b6607bc, com.xpn.xwiki.api.Object@2785e61b, com.xpn.xwiki.api.Object@47c60ae2, com.xpn.xwiki.api.Object@1af4a03e, com.xpn.xwiki.api.Object@32445445, com.xpn.xwiki.api.Object@23f897cb]
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