nushell/docs/commands/update.md
JT 8c0a2d3c15
Auto-generate markdown command docs (#4451)
* Finish updating

* a couple improvements

* Update renames

* cleanup examples
2022-02-13 21:22:51 -05:00

30 lines
570 B
Markdown

---
title: update
layout: command
version: 0.59.0
---
Update an existing column to have a new value.
## Signature
```> update (field) (replacement value)```
## Parameters
- `field`: the name of the column to update
- `replacement value`: the new value to give the cell(s)
## Examples
Update a column value
```shell
> echo {'name': 'nu', 'stars': 5} | update name 'Nushell'
```
Use in block form for more involved updating logic
```shell
> echo [[project, authors]; ['nu', ['Andrés', 'JT', 'Yehuda']]] | update authors { get authors | str collect ',' }
```