Thursday, September 14, 2017

Grouping SharePoint List Items using Jquery/REST/JSON

In this post, I will share requirement where I need to retrieve SharePoint list data that contains following list items.

                                                          

Below is what I need to from SharePoint list:

1. I need to group below list based on the Title.
2. I need to display the grouped results with sum of Number column.

The end result should be as below:

Name:One- Total 10
Name:Two- Total 7
Name:Three- Total 6

Main issue here is the SharePoint REST API doesn't support grouping. The above requirement can be achieve by grouping the JSON response that is obtained from the REST query. Below is the complete code that does grouping.




No comments:

Post a Comment