Skip to content

Instantly share code, notes, and snippets.

View Zignature's full-sized avatar

Siegert Naber Zignature

  • The Netherlands
View GitHub Profile
@holmberd
holmberd / js-nestGroupsBy.md
Last active November 28, 2024 16:16
Dynamically create nested level groups by properties in Javascript

Dynamically create nested level groups by properties in Javascript

Code

/**
 * Creates nested groups by object properties.
 * `properties` array nest from highest(index = 0) to lowest level.
 *
 * @param {String[]} properties
 * @returns {Object}