Results for “associative array”
Small, practical examples. Search by task or narrow things down below.
Declare a fixed-size array
Declare a fixed-size array using a complete Go program with explicit sample inputs.
Go✓ Tested
Enumerate the items of a JSON array
C#: Dispose JsonDocument after reading its elements.
C#✓ Tested
Expand a JSON array into rows
Iterate array elements using a table-valued function.
json_each✓ Tested
Expand an array into rows
Use WITH ORDINALITY to retain original element order.
unnest✓ Tested
Filter an array in place with a write index
C: Only retained values advance the write position.
C✓ Tested
Filter and transform an array
Keep active objects and extract their names.
filter✓ Tested
Find an array element
Use a bounded linear search over a C array.
C✓ Tested
Find the first matching array item
JavaScript: find returns undefined when no item satisfies the predicate.
JavaScript✓ Tested
Find the first matching array item
TypeScript: find returns undefined when no item satisfies the predicate.
TypeScript✓ Tested
Find the index of an array item
PowerShell: Array.IndexOf returns -1 when the requested item is absent.
PowerShell✓ Tested
Find the largest array value
Track the maximum in a nonempty C integer array.
C✓ Tested
Find the smallest value in a nonempty array
C: Initialize from the first element instead of assuming a numeric sentinel.
C✓ Tested