Results for “json_extract”
Small, practical examples. Search by task or narrow things down below.
Expand an array into rows
Use WITH ORDINALITY to retain original element order.
unnest✓ Tested
Filter and transform an array
Keep active objects and extract their names.
filter✓ Tested
Find the commit responsible for a line
Inspect line attribution in a stable machine-readable format.
blame✓ Tested
Format a timestamp
Extract a year and month from ISO timestamp text.
strftime✓ Tested
Iterate over object entries
Read JavaScript property names and values using Object.entries.
JavaScript✓ Tested
Keep exec-form arguments literal
Docker / Compose: JSON exec form does not expand shell environment variables.
Docker / Compose✓ Tested
List files in a tar archive
Inspect the contents of a gzip-compressed tar archive without extracting any files.
tar✓ Tested
Merge object settings
Use object spread to apply JavaScript overrides to defaults.
JavaScript✓ Tested
Print only the matching portions
Linux Commands: Use extended regex and -o to extract digit sequences.
Linux Commands✓ Tested
Read a byte suffix
Linux Commands: Use GNU tail -c to extract a fixed-size ending.
Linux Commands✓ Tested
Read a filename extension
Extract the final extension from a C++ filesystem path.
C++✓ Tested
Read a nested value safely
Combine optional chaining with nullish coalescing in JavaScript.
JavaScript✓ Tested