FIND YOUR NEXT FEW LINES

Results for “Hashtables & object records”

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

151 snippets foundClear filters
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
PythonStructured data & serialization

Read one JSON document per line

Python: Parse nonempty JSON Lines records independently instead of loading a JSON array.

Python✓ Tested
PowerShellText & data

Read rows from CSV text

Parse CSV into objects with named properties.

CSV✓ Tested
TypeScriptCollections & records

Remove duplicate values with a Set

Keep the first occurrence order while deduplicating.

Set✓ Tested
Arduino / CText & bounded buffers

Replace a token inside an Arduino String

Arduino / C: replace modifies all occurrences in the existing object.

Arduino / C✓ Tested
GitRemotes & additional checkouts

Replace the URL of a configured remote

Git: set-url changes configuration without fetching or pushing any objects.

Git✓ Tested
C++Ownership & optional values

Run cleanup through a scoped destructor

C++: A stack object’s destructor runs when its scope exits, including normal exception unwinding.

C++✓ Tested
TypeScriptUtilities & async

Select fields with the Pick utility type

Expose a smaller view of a larger object type.

Pick✓ Tested
PowerShellText & data

Serialize a hashtable as JSON

Produce compact JSON for a small data object.

JSON✓ Tested
Docker / ComposeLimits & process security

Set and inspect a fractional CPU limit

Docker / Compose: The cpus option records a limit in units of one billion NanoCPUs.

Docker / Compose✓ Tested