Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

url split-query for network

Converts query string into table applying percent-decoding.

Signature

> url split-query {flags}

Input/output types:

inputoutput
stringtable<key: string, value: string>

Examples

Outputs a table representing the contents of this query string

> "mode=normal&userid=31415" | url split-query
╭───┬────────┬────────╮
│ # │  key   │ value  │
├───┼────────┼────────┤
│ 0 │ mode   │ normal │
│ 1 │ userid │ 31415  │
╰───┴────────┴────────╯

Outputs a table representing the contents of this query string, url-decoding the values

> "a=AT%26T&b=AT+T" | url split-query
╭───┬─────┬───────╮
│ # │ key │ value │
├───┼─────┼───────┤
│ 0 │ a   │ AT&T  │
│ 1 │ b   │ AT T  │
╰───┴─────┴───────╯

Outputs a table representing the contents of this query string

> "a=one&a=two&b=three" | url split-query
╭───┬─────┬───────╮
│ # │ key │ value │
├───┼─────┼───────┤
│ 0 │ a   │ one   │
│ 1 │ a   │ two   │
│ 2 │ b   │ three │
╰───┴─────┴───────╯