2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
title: from json
|
|
|
|
layout: command
|
2022-03-04 13:10:09 +01:00
|
|
|
version: 0.59.1
|
2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
Convert from json to structured data
|
|
|
|
|
|
|
|
## Signature
|
|
|
|
|
|
|
|
```> from json --objects```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
- `--objects`: treat each line as a separate value
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
Converts json formatted string to table
|
|
|
|
```shell
|
2022-02-21 18:26:00 +01:00
|
|
|
> '{ "a": 1 }' | from json
|
2022-02-14 03:22:51 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
Converts json formatted string to table
|
|
|
|
```shell
|
2022-02-21 18:26:00 +01:00
|
|
|
> '{ "a": 1, "b": [1, 2] }' | from json
|
2022-02-14 03:22:51 +01:00
|
|
|
```
|