Results for “Collections & data structures”
Small, practical examples. Search by task or narrow things down below.
Fetch a plain-text resource
jQuery: An explicit text data type keeps the response as a string.
jQuery✓ Tested
Filter a list with a condition
Build a new list containing only the values that satisfy a condition using a list comprehension.
list✓ Tested
Filter aggregate groups
Keep only categories with multiple products.
HAVING✓ Tested
Filter and transform an array
Keep active objects and extract their names.
filter✓ Tested
Filter by a numeric comparison
SQL: Keep rows whose quantity exceeds a chosen threshold.
SQL✓ Tested
Filter by a numeric comparison
SQL Server: Keep rows whose quantity exceeds a chosen threshold.
SQL Server✓ Tested
Filter even numbers
Use LINQ Where to keep even C# values.
C#✓ Tested
Filter even numbers
Use a Java stream to collect only even values.
Java✓ Tested
Filter groups after aggregation
SQL: Use HAVING to test a group’s calculated total.
SQL✓ Tested
Filter groups after aggregation
SQL Server: Use HAVING to test a group’s calculated total.
SQL Server✓ Tested
Filter history by its author identity
Git: The author filter selects commits by their recorded author metadata.
Git✓ Tested
Filter items in a pipeline
Keep numbers that meet a condition.
Where-Object✓ Tested