Data transformation utilities for JSON, CSV, XML, YAML, and Markdown. Parse, convert, query, and transform data between formats with JQ-like filtering support.
Convert and transform data between formats with powerful querying capabilities.
node /path/to/skills/data-transform/scripts/convert.js data.json --to csv
node /path/to/skills/data-transform/scripts/query.js data.json "$.users[*].name"
node /path/to/skills/data-transform/scripts/parse.js data.csv --format csv
Convert between data formats.
Usage:
node convert.js <input> --to <format> [OPTIONS]
Formats:
json - JSONcsv - Comma-separated valuestsv - Tab-separated valuesyaml - YAMLxml - XMLmarkdown - Markdown tablehtml - HTML tableOptions:
--to <format> - Target format (required)--from <format> - Source format (auto-detected if not specified)--output <file> - Save to file--pretty - Pretty print outputQuery and filter data using JSONPath or JQ-like syntax.
Usage:
node query.js <input> <query> [OPTIONS]
Query Syntax:
$.field - Access field$.array[0] - Array index$.array[*] - All array elements$.array[?(@.age > 18)] - Filter$..name - Recursive descentOptions:
--format <fmt> - Input format (default: auto)--output <fmt> - Output format: json, csv, lines (default: json)Parse data files with format detection.
Usage:
node parse.js <input> [OPTIONS]
Options:
--format <fmt> - Force input format--validate - Validate and report errors--schema <file> - Validate against JSON schemaApply transformations to data.
Usage:
node transform.js <input> --map <expression>
node transform.js <input> --filter <expression>
node transform.js <input> --sort <field>
Options:
--map <expr> - Transform each item (JS expression)--filter <expr> - Filter items (JS expression)--sort <field> - Sort by field--reverse - Reverse order--unique <field> - Remove duplicates--group <field> - Group by field--limit <n> - Limit resultsCompare two data files.
Usage:
node diff.js <file1> <file2> [OPTIONS]
Options:
--format <fmt> - Output format: unified, json, side-by-side--ignore-order - Ignore array order--ignore-case - Case-insensitive comparisonecho '[{"name":"John","age":30},{"name":"Jane","age":25}]' | node convert.js - --to csv
Output:
name,age
John,30
Jane,25
node query.js api-response.json "$.data.users[?(@.active==true)].email"
node transform.js users.json --filter "x.age >= 18" --sort age --map "{name: x.name, adult: true}"
node convert.js report.csv --to markdown
Output:
| Name | Score |
|------|-------|
| Alice | 95 |
| Bob | 87 |
node diff.js old-config.json new-config.json --format unified
node parse.js data.json --validate --schema schema.json
| Format | Read | Write | Notes |
|---|---|---|---|
| JSON | ✅ | ✅ | Full support |
| CSV | ✅ | ✅ | Auto-detects headers |
| TSV | ✅ | ✅ | Tab-delimited |
| YAML | ✅ | ✅ | Single document |
| XML | ✅ | ✅ | Basic support |
| Markdown | ✅ | ✅ | Tables only |
| HTML | ❌ | ✅ | Tables only |
{
"query": "$.users[*].name",
"results": ["John", "Jane", "Bob"],
"count": 3
}
{
"added": [{"path": "$.newField", "value": "new"}],
"removed": [{"path": "$.oldField", "value": "old"}],
"changed": [{"path": "$.field", "old": 1, "new": 2}],
"unchanged": 10
}