Groovy
Retrieve the first object (index [0]) among all objects attached to this page and class XWikiComments
com.xpn.xwiki.api.Object@a3bf47e
Retrieve all objects attached to this page and of class XWikiComments
[com.xpn.xwiki.api.Object@685dc748, com.xpn.xwiki.api.Object@64c67d7f, com.xpn.xwiki.api.Object@23595089, com.xpn.xwiki.api.Object@3cb66480, com.xpn.xwiki.api.Object@6a802ea3, com.xpn.xwiki.api.Object@57605f5, com.xpn.xwiki.api.Object@7811aa0, com.xpn.xwiki.api.Object@2cfb0239, com.xpn.xwiki.api.Object@134f0341]
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