I have created SharePoint Hosted app.

I have list called Likes it contains item records.

I have custom columns called Ids it hold the another list item id ID.

enter image description here

Using JSOM in SharePoint Hosted app, I'm trying to get count of Similar Ids columns value.

Example: In the list there are some records having Ids is 6 and their count is 3.

  • How many items (records) do you plan to store in this list (roughly)?
    – Evariste
    Jul 14, 2017 at 18:29
  • I'm planning to store more than 500 records Jul 17, 2017 at 4:24
  • "more than 500 records", but less than...?
    – Evariste
    Jul 17, 2017 at 5:47

2 Answers 2


If I am not wrong, you want to group the list item with the column ids as displayed in the below image:

Highlighted area displays the count

In order to achieve this, please follow the following link: https://piyushksingh.com/2016/11/21/retrieve-grouped-listitems-sharepoint/ So in this link, both CSOM and JSOM code snippets are available.


The only possible option seems that you have to write some tricky codes. Follow the below steps:

  • Write JSOM and Get all items in JavaScript Array.
  • Apply Group By functionality
  • Count the Similar items
  • Display the count.

For group by and counting using JavaScript, you can refer How do I do a array group and count it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.