Home Explore Blog CI



nushell

commands/docs/get.md
544dee40e0247aa3ef5ed7232581b304892206d8e10067ee00000003000006a5
---
title: get
categories: |
  filters
version: 0.104.0
filters: |
  Extract data using a cell path.
usage: |
  Extract data using a cell path.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `get` for [filters](/commands/categories/filters.md)

<div class='command-title'>Extract data using a cell path.</div>

## Signature

```> get {flags} (cell_path) ...rest```

## Flags

 -  `--ignore-errors, -i`: ignore missing data (make all cell path members optional)
 -  `--sensitive, -s`: get path in a case sensitive manner

## Parameters

 -  `cell_path`: The cell path to the data.
 -  `...rest`: Additional cell paths.


## Input/output types:

| input     | output  |
| --------- | ------- |
| list\<any\> | any     |
| nothing   | nothing |
| record    | any     |
| table     | any     |
## Examples

Get an item from a list
```nu
> [0 1 2] | get 1
1
```

Get a column from a table
```nu
> [{A: A0}] | get A
╭───┬────╮
│ 0 │ A0 │
╰───┴────╯

```

Get a cell from a table
```nu
> [{A: A0}] | get 0.A
A0
```

Extract the name of the 3rd record in a list (same as `ls | $in.name.2`)
```nu
> ls | get name.2

```

Extract the name of the 3rd record in a list
```nu
> ls | get 2.name

```

Getting Path/PATH in a case insensitive way
```nu
> $env | get paTH

```

Getting Path in a case sensitive way, won't work for 'PATH'
```nu
> $env | get --sensitive Path

```

## Notes
This is equivalent to using the cell path access syntax: `$env.OS` is the same as `$env | get OS`.

If multiple cell paths are given, this will produce a list of values.

Chunks
4eca84e1 (1st chunk of `commands/docs/get.md`)
Title: get command documentation
Summary
This document describes the `get` command in Nushell, which extracts data from lists, records, and tables using cell paths. It details the command's signature, flags (like `--ignore-errors` and `--sensitive`), parameters, input/output types, and provides usage examples. The command is equivalent to using cell path access syntax (e.g., `$env.OS`).