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
ReactContext & shared state

Provide read-only application configuration

Provide read-only application configuration with a small React component and explicit browser behavior.

React✓ Tested
ReactAccessibility & events

Read a data attribute from the current target

Read a data attribute from the current target with a small React component and explicit browser behavior.

React✓ Tested
AngularEvents & DOM interaction

Read a DOM element through a viewChild signal

Read a DOM element through a viewChild signal with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
jQueryEvent control

Read a handler result without event bubbling

jQuery: triggerHandler invokes the first matched element’s handlers without native default behavior.

jQuery✓ Tested
PythonJSON & CSV

Read a JSON file

Load a JSON document from disk into Python objects using an explicitly selected text encoding.

json✓ Tested
JavaCollections

Read a map with a default

Return a fallback when a Java map does not contain a key.

Java✓ Tested
JavaScriptObjects & JSON

Read a nested value safely

Combine optional chaining with nullish coalescing in JavaScript.

JavaScript✓ Tested
TypeScriptUtilities & async

Read a property with keyof

Keep the key and returned value tied to an object type.

keyof✓ Tested
SQL ServerJSON & results

Read a scalar JSON property

Extract a named value using a JSON path.

JSON_VALUE✓ Tested
jQueryEvent control

Read a selection when its change event fires

jQuery: A change handler observes the current selected value.

jQuery✓ Tested
jQueryGetting Started

Read a text field’s value

jQuery: Learn how to read a text field’s value in a complete browser example.

jQuery✓ Tested
AngularEvents & DOM interaction

Read a typed input event

Read a typed input event with a standalone Angular component and explicit browser behavior.

Angular✓ Tested