FIND YOUR NEXT FEW LINES

Results for “json_extract”

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

112 snippets foundClear filters
PostgresJSON & arrays

Expand an array into rows

Use WITH ORDINALITY to retain original element order.

unnest✓ Tested
TypeScriptCollections & records

Filter and transform an array

Keep active objects and extract their names.

filter✓ Tested
GitCommits & history

Find the commit responsible for a line

Inspect line attribution in a stable machine-readable format.

blame✓ Tested
SQLiteDates & time

Format a timestamp

Extract a year and month from ISO timestamp text.

strftime✓ Tested
JavaScriptObjects & JSON

Iterate over object entries

Read JavaScript property names and values using Object.entries.

JavaScript✓ Tested
Docker / ComposeDockerfile patterns

Keep exec-form arguments literal

Docker / Compose: JSON exec form does not expand shell environment variables.

Docker / Compose✓ Tested
Linux CommandsArchives & checksums

List files in a tar archive

Inspect the contents of a gzip-compressed tar archive without extracting any files.

tar✓ Tested
JavaScriptObjects & JSON

Merge object settings

Use object spread to apply JavaScript overrides to defaults.

JavaScript✓ Tested
Linux CommandsSearching text

Print only the matching portions

Linux Commands: Use extended regex and -o to extract digit sequences.

Linux Commands✓ Tested
Linux CommandsStreams & byte tools

Read a byte suffix

Linux Commands: Use GNU tail -c to extract a fixed-size ending.

Linux Commands✓ Tested
C++Files & paths

Read a filename extension

Extract the final extension from a C++ filesystem path.

C++✓ Tested
JavaScriptObjects & JSON

Read a nested value safely

Combine optional chaining with nullish coalescing in JavaScript.

JavaScript✓ Tested