Grouping and counting

Hi. Good morning appgyver users :slight_smile:

How can i get this results by grouping and counting?
Or this is possible on appgyver?

[
  {
     name: sample1,
     completed: 1,
     incomplete: 2
  },
{
     name: sample2,
     completed: 1,
     incomplete: 1 
  }

]

API response

[
  {
     name: sample1,
     status: incomplete,
     count:  2
  },
  {
     name: sample1,
     status: complete,
     count:  1
  },
  {
     name: sample2,
     status: complete,
     count:  1
  },
  {
     name: sample2,
     status: incomplete,
     count:  1
  }
]

check out these two functions
GROUP and COUNT
After grouping you can count the items in your grouped list