FIND YOUR NEXT FEW LINES
Results for “associative array”
Small, practical examples. Search by task or narrow things down below.
152 snippets foundClear filters
Set an image’s default command
Use JSON array syntax for a predictable command.
Dockerfile✓ Tested
Set several selected options
jQuery: Passing an array to val selects matching values in a multiple select.
jQuery✓ Tested
Sort numbers numerically
Supply a numeric comparator instead of JavaScript string sorting.
JavaScript✓ Tested
Split values into fixed-size chunks
C#: Enumerable.Chunk creates arrays and allows a shorter final chunk.
C#✓ Tested
Sum numeric values
Provide an initial accumulator for JavaScript reduce, including empty arrays.
JavaScript✓ Tested
Transform each item with Select
C#: Project each input value into a new value without modifying the source array.
C#✓ Tested
Turn JSON into typed rows
Project JSON array items into SQL columns.
OPENJSON✓ Tested
Use a deque as a FIFO queue
Java: Add at the tail and remove at the head using ArrayDeque.
Java✓ Tested