Package Exports
- jsonfieldexplorer
- jsonfieldexplorer/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jsonfieldexplorer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
JsonFieldExplorer (jfe)
Description
JsonFieldExplorer (jfe) is a command-line tool that simplifies the exploration of JSON data structures. It analyzes JSON files and lists all possible field paths, aiding in understanding and navigating complex JSON objects. This tool is especially useful for developers and data analysts working with large and nested JSON files.
Installation
To install JsonFieldExplorer, use npm:
npm install -g jsonfieldexplorerThis will install jfe globally on your system, allowing you to use it from any directory.
Usage
To use jfe, simply pass the path of your JSON file as an argument:
jfe path/to/yourfile.jsonYou can also pipe in JSON.
$ echo '{"a": [{"b": true}]}' | jfe
a
a[].bExamples
Given a JSON file like this:
{
"organization": {
"name": "OpenAI",
"location": "San Francisco",
"departments": [
{
"name": "Research",
"employees": 100
},
{
"name": "Engineering",
"employees": 80
}
]
}
}Running jfe on this file would produce output similar to the following:
organization.name
organization.location
organization.departments[].name
orgrnization.departments[].employeesThis output indicates that the JSON file contains fields for the organization's name and location, as well as an array of departments, each with its own name and number of employees.
License
This project is licensed under the ISC License - see the LICENSE.md file for details.