PnP-JS-Core library contains the number of extensible methods and properties. By using that we can achieve the various actions in a simple code. To know more about this library component, visit the below links,
SharePoint has lot of building blocks in collections which are used to form a SharePoint site. Those are used in manage the contents, generate reports based on contents & settings, etc…
In this post, we will use the PnP-JS-Core method to get the group information based on name.
pnp.sp.web.siteGroups.getByName - Gets the group based on name from the SharePoint site group collection.
- Download Required files to use PnP-JS-Core library from the below links and upload that to Site Assets or Style Library
- Create new web part page and insert Content Editor web part
- Create a sample.html file in Site Assets or Style library and insert the below code snippet
- Add the URL of sample.html file to the content editor web part
- Click ok to apply the changes to the web part and save the page.
- Now the page displays the title of Group and its description.
PnP-JS-Core library has a lot of simple extension properties and methods that helps increases the performances and reduce the number of lines for code.