> For the complete documentation index, see [llms.txt](https://docs.no-reducer.com/no-reducer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.no-reducer.com/no-reducer/no-reducer-actions/destination-path.md).

# destination path

As we know, in Redux, the state is represented as a **tree** or a **JSON** object. At times, it becomes necessary to modify a nested object or a **leaf** in the tree. In order to achieve this, a **destination path** is provided, which points to the specific object that needs to be modified.

#### 1. We will utilize the symbol <mark style="color:red;">**>**</mark> to indicate the specific object we intend to modify.

For example: we want to modify the **`name`** inside **`company`** inside the **`User`**. We have to write a path to go to that named object.&#x20;

In this case, we use `>` symbol to point out

```javascript
User>company>name 

```

<figure><img src="https://2096029297-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa8hQdsN7Pv00B1Pt9tuc%2Fuploads%2Fuejcx3sH7NKMJ6vI7xcd%2F68747470733a2f2f766e73656174746c652e636f6d2f64796e616d6963526564756365722f44657374696e6174696f6e50617468322e706e67.png?alt=media&amp;token=6ae44d36-d471-4b34-88a9-ee8bdaa29074" alt=""><figcaption></figcaption></figure>

In order to see how to use the **Destination Path**, we can examine an example of an insert function where we aim to insert an object into a leaf node of the tree.

**Example of using&#x20;*****Destination Path***

I want to [insert ](/no-reducer/no-reducer-actions/insert.md)`{ gps: {x,y,z} }` into `User>address>geo`<br>

```javascript
dispatch(insert('User>address>geo', gps', {x,y,z}); 
```

<figure><img src="https://2096029297-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa8hQdsN7Pv00B1Pt9tuc%2Fuploads%2FHlYCVK0swlTREVECBiKH%2F68747470733a2f2f766e73656174746c652e636f6d2f64796e616d6963526564756365722f496e73657274576974684465732e706e67.png?alt=media&amp;token=12cc5519-1b2f-4f0a-8416-f4bfd10c0057" alt=""><figcaption></figcaption></figure>

#### 2. If you want to traverse an item in an array, you can use the symbol <mark style="color:red;">|</mark> <mark style="color:red;">\[key]=\[value]</mark> to specify the particular object that you want to modify.

Update `companies` with `cid=5` in `students` with <mark style="color:red;">`id=4`</mark> in `MyClass`

```javascript
dispatch(update('MyClass>students|id=4>companies', { name: "Meta" }, 5, 'cid'))
```

<figure><img src="https://2096029297-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa8hQdsN7Pv00B1Pt9tuc%2Fuploads%2FZuYtxkS5gxD5v0mmul1u%2F68747470733a2f2f766e73656174746c652e636f6d2f64796e616d6963526564756365722f75706461746554657465644172726179322e706e67.png?alt=media&amp;token=b8325de4-ff20-429a-afd0-1dfbefc00acf" alt=""><figcaption></figcaption></figure>

<br>
