Use Query Loop type: Array,
then create a function on functions.php
and whitelist on bricks
function bricks_comments_array() {
$post_id = get_the_ID();
$comments = get_comments([
'post_id' => $post_id,
'status' => 'approve',
]);
$result = [];
foreach ($comments as $comment) {
$result[] = [
'author' => $comment->comment_author,
'content' => $comment->comment_content,
];
}
return $result;
}
then echo that on the query loop element, type array
{echo:bricks_comments_array()}
and output values on nested elements as:
{query_array @key:‘content’}
{query_array @key:‘author’}