https://github.com/octref/vscode-json-transform
Interactively transform JSON in VSCode.
https://github.com/octref/vscode-json-transform
Last synced: 3 months ago
JSON representation
Interactively transform JSON in VSCode.
- Host: GitHub
- URL: https://github.com/octref/vscode-json-transform
- Owner: octref
- Created: 2016-08-31T00:41:47.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-19T19:58:31.000Z (over 9 years ago)
- Last Synced: 2025-03-25T10:51:13.806Z (about 1 year ago)
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items/octref.vscode-json-transform
- Size: 5.83 MB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JSON Transform for VSCode
Interactively transform JSON in VSCode.
### Demo

### Pattern
The transform pattern is very to learn. A few examples:
Original json:
```
[
{ "name": "ada", "age": 18 },
{ "name": "bob", "age": 19 },
{ "name": "cal", "age": 20 },
{ "name": "don", "age": 21 }
]
```
`[1]`
```
{ "name": "ada", "age": 18 }
```
`[:2]`
```
[
{ "name": "ada", "age": 18 },
{ "name": "bob", "age": 19 }
]
```
`[:2].name`
```
[
"ada",
"bob"
]
```
`[:2].{ NickName: name }`
```
[
{ "NickName": "ada" },
{ "NickName": "bob" }
]
```
To learn more about the patterns and try it interactively, go to [JMESPath Tutorial](http://jmespath.org/tutorial.html).
### License
MIT