Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fx

Package Overview
Dependencies
Maintainers
0
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fx

Command-line JSON viewer

  • 35.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
201K
increased by8.31%
Maintainers
0
Weekly downloads
 
Created

What is fx?

The fx npm package is a command-line JSON processing tool that allows users to manipulate and transform JSON data using JavaScript expressions. It is designed to be simple and powerful, enabling quick and efficient JSON data processing directly from the terminal.

What are fx's main functionalities?

Basic JSON Filtering

This feature allows you to filter JSON data to extract specific fields. In this example, the command extracts the 'name' field from the JSON object.

echo '{"name": "John", "age": 30}' | fx '.name'

Complex JSON Transformations

This feature enables complex transformations of JSON data using JavaScript functions. The example command maps over an array of objects and extracts the 'name' field from each object.

echo '[{"name": "John", "age": 30}, {"name": "Jane", "age": 25}]' | fx 'map(x => x.name)'

Chaining Operations

This feature allows chaining multiple operations to perform more complex data manipulations. The example command filters the array to include only objects where 'age' is greater than 25 and then maps to extract the 'name' field.

echo '[{"name": "John", "age": 30}, {"name": "Jane", "age": 25}]' | fx 'filter(x => x.age > 25).map(x => x.name)'

Other packages similar to fx

FAQs

Package last updated on 27 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc