Results for “Group-Object”
Small, practical examples. Search by task or narrow things down below.
Read named fields from a successful regex match
PowerShell: The Matches table is updated after a successful scalar match operation.
PowerShell✓ Tested
Remove a Map entry and detect whether it existed
JavaScript: Map.delete returns true only when an entry was present.
JavaScript✓ Tested
Remove a Map entry and detect whether it existed
TypeScript: Map.delete returns true only when an entry was present.
TypeScript✓ Tested
Remove an optional hashtable entry
PowerShell: Remove changes the map in place without changing unrelated entries.
PowerShell✓ Tested
Return zero for a sum over no rows
SQL: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
SQL✓ Tested
Return zero for a sum over no rows
SQL Server: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
SQL Server✓ Tested
Return zero for a sum over no rows
Postgres: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
Postgres✓ Tested
Return zero for a sum over no rows
SQLite: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
SQLite✓ Tested
Set several inline styles together
jQuery: Pass a property-value object to css.
jQuery✓ Tested
Sort and deduplicate values
Produce an ordered list without duplicates.
Sort-Object✓ Tested
Sum a collection
Calculate a total with Measure-Object.
Measure-Object✓ Tested
Sum values per category
Calculate a grouped total.
SUM✓ Tested