Here is my json
[
  {
    id:1,
    name:'rakib'
  },
  {
    id:2,
    name:'sakib'
  },
  {
    id:3,
    name:'sakib'
  },
  {
    id:4,
    name:'akib'
  }
]
In this, I want to count the number of names but not duplicate by node js in MongoDB My count will be: 3 ('rakib', 'sakib', 'akib')
 
    