FIND YOUR NEXT FEW LINES

Results for “Object behavior & collections”

Small, practical examples. Search by task or narrow things down below.

631 snippets foundClear filters
ReactGetting Started

Pass an object to the style prop

Pass an object to the style prop with a small React component and explicit browser behavior.

React✓ Tested
AngularSignals & state

Replace an object signal immutably

Replace an object signal immutably with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PowerShellCollections & objects

Select object properties

Create a smaller object with only the fields you need.

Select-Object✓ Tested
jQueryHTTP requests

Send query parameters as an object

jQuery: jQuery encodes the data object into the request query.

jQuery✓ Tested
jQueryForm serialization & state

Store an object associated with an element

jQuery: data retains JavaScript values without serializing them into HTML attributes.

jQuery✓ Tested
ReactState & reducers

Update a nested object immutably

Update a nested object immutably with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Update an object without mutating state

Update an object without mutating state with a small React component and explicit browser behavior.

React✓ Tested
GoFunctions & types

Accept a small behavior interface

Accept a small behavior interface using a complete Go program with explicit sample inputs.

Go✓ Tested
GoFunctions & types

Attach behavior to a struct

Attach behavior to a struct using a complete Go program with explicit sample inputs.

Go✓ Tested
GitCommit history & revision selection

Check what kind of Git object a revision names

Git: cat-file -t distinguishes a commit, tree, blob, or annotated tag.

Git✓ Tested
C#Collections & data structures

Combine collections as a distinct set

C#: Union retains each value once across both inputs.

C#✓ Tested
PowerShellHashtables & object records

Convert an object’s properties into a hashtable

PowerShell: Enumerate PSObject.Properties when the set of property names is known only at runtime.

PowerShell✓ Tested