I have problems to create a json view (rest export) in Drupal 8, my goal : select count(*) from content type = "..." and published = yes
The output must be json notation and the total amount of nodes for a specific content type.
In the Advanced selection I set "use aggregation = yes"
under Fields I use the aggregation setting "count" on content type
Filter criteria: published status = yes, content type = myCT

Result: [{"type":"1"},{"type":"1"},{"type":"1"},....]

I did the same in drupal 7 without any issues but can't get it work in D8.
Has anybody an idea how to get this solved

Comments

jasper.van.loon’s picture

it's solved. had the wrong sort criteria selected. It must be sorted on "content type".