Last active
September 6, 2023 02:45
-
-
Save nicokosi/3fbee1980ebe1b39f203fc084a6fc4bf to your computer and use it in GitHub Desktop.
Manipulating data with nushell commands (see https://www.nushell.sh / https://www.nushell.sh/cookbook)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download a JSON file from a URL and visualize it: | |
fetch https://jsonplaceholder.typicode.com/posts | |
# Visualize a JSON file: | |
open ./work/tldr/package.json | |
# Fetch the first 2 JSON array items: | |
fetch https://jsonplaceholder.typicode.com/posts | first 2 | |
# Fetch raw JSON : | |
fetch https://jsonplaceholder.typicode.com/posts --raw | |
# Fetch all 'userId' JSON attribute values from a URL: | |
(fetch https://jsonplaceholder.typicode.com/posts).userId | |
# or | |
fetch https://jsonplaceholder.typicode.com/posts | get userId |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment