I believe the example proposed above matches the requirements for your first table, see the doc.objectCount property contains the number of comments of each page.
For you second table, you simple have to:
- remove the
doc.objectCountproperty - remove the
source=uniquesource parameter (which allows to group the object per page and to count them) - add a
commentproperty
See the result below:
{{liveData
id="classEntries"
properties="doc.title,doc.location,doc.date,doc.author,comment,_actions"
source="liveTable"
sourceParameters="className=XWiki.XWikiComments&translationPrefix=platform.index."
}}
{
"meta": {
"propertyDescriptors": [
{
"id": "doc.title",
"editable": false
}
]
}
}
{{/liveData}}