Skip to content

Conversation

@joshrotenberg
Copy link
Collaborator

Summary

Update jmespath-extensions from v0.6 to v0.7.0.

New Functions Available

From jmespath-extensions v0.7.0:

CSV/TSV Formatting

  • to_csv(array) - Convert array to CSV row
  • to_tsv(array) - Convert array to TSV row
  • to_csv_rows(array_of_arrays) - Convert arrays to multi-line CSV
  • to_csv_table(array_of_objects, columns?) - Convert objects to CSV table with headers

Utility Functions

  • pretty(value) - Pretty-print JSON
  • html_escape(string) - Escape HTML entities
  • env(name) - Access environment variables

Documentation Updates

  • Converted remaining jq @csv examples to use native JMESPath to_csv() and to_csv_table()
  • Added Format category to function reference table

Example

# Before (required jq)
redisctl enterprise usage-report get -q 'databases' | \
  jq -r '(.[] | [.name, .memory_mb]) | @csv'

# After (native JMESPath)
redisctl enterprise usage-report get -q '
  to_csv_table(databases, [\`"name"\`, \`"memory_mb"\`])
' --raw

Update to jmespath-extensions v0.7.0 which adds:
- CSV/TSV formatting functions (to_csv, to_tsv, to_csv_table)
- Utility functions (pretty, html_escape, env)

Convert remaining @csv jq examples in docs to use native JMESPath:
- to_csv() for single row output
- to_csv_table() for multi-row with headers

Update function categories reference to include new Format category.
@joshrotenberg joshrotenberg merged commit 38ac3a7 into main Dec 19, 2025
27 checks passed
@joshrotenberg joshrotenberg deleted the chore/bump-jmespath-extensions branch December 19, 2025 03:52
@joshrotenberg joshrotenberg mentioned this pull request Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants