Home Explore Blog CI



nushell

commands/docs/into_cell-path.md
f72162a6e93d29f71bb7f07696add96784b0a4dfa096e78f0000000300000585
---
title: into cell-path
categories: |
  conversions
version: 0.104.0
conversions: |
  Convert value to a cell-path.
usage: |
  Convert value to a cell-path.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `into cell-path` for [conversions](/commands/categories/conversions.md)

<div class='command-title'>Convert value to a cell-path.</div>

## Signature

```> into cell-path {flags} ```


## Input/output types:

| input                                    | output    |
| ---------------------------------------- | --------- |
| cell-path                                | cell-path |
| int                                      | cell-path |
| list\<any\>                                | cell-path |
| list\<record\<value: any, optional: bool\>\> | cell-path |
## Examples

Convert integer into cell path
```nu
> 5 | into cell-path
$.5
```

Convert cell path into cell path
```nu
> 5 | into cell-path | into cell-path
$.5
```

Convert string into cell path
```nu
> 'some.path' | split row '.' | into cell-path
$.some.path
```

Convert list into cell path
```nu
> [5 c 7 h] | into cell-path
$.5.c.7.h
```

Convert table into cell path
```nu
> [[value, optional]; [5 true] [c false]] | into cell-path
$.5?.c
```

## Notes
Converting a string directly into a cell path is intentionally not supported.

Chunks
6ad49764 (1st chunk of `commands/docs/into_cell-path.md`)
Title: into cell-path: Convert a value into a cell-path
Summary
The `into cell-path` command converts various data types like integers, lists, and tables into a cell-path. It shows how to convert integers, strings (via split), lists, and tables to cell paths. It explicitly notes that direct string conversion to cell path is not supported.