# Get Category path with highest depth

**URL:** <https://forum.alumio.com/t/get-category-path-with-highest-depth/2031>\
**Category:** General\
**Created:** [June 3, 2025, 7:18am UTC](https://forum.alumio.com/t/get-category-path-with-highest-depth/2031 "2025-06-03T07:18:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vosy](https://forum.alumio.com/letter_avatar_proxy/v4/letter/v/ecd19e/32.png) [@vosy](https://forum.alumio.com/u/vosy)\
**Post date:** [June 3, 2025, 7:18am UTC](https://forum.alumio.com/t/get-category-path-with-highest-depth/2031/1 "2025-06-03T07:18:57Z")

</div>

Hi, I have this data, and i would need to find out the “path” with highest “depth” and write it to “category\_path” in the root.

{  
“category\_tree\_result”:[  
{  
“id”: “ACKA\_SE\_STANDARDNIM\_POTISKEM”,  
“path”: “ACKA\_SE\_STANDARDNIM\_POTISKEM”,  
“depth”: 1  
},

```
{
  "id": "ACKOVE_STOJANY_SE_STANDARDNIM_POTISKEM",
  "path": "PRINT_MENU | Poster_Banner_Printing | ACKOVE_STOJANY_SE_STANDARDNIM_POTISKEM",
  "depth": 3
},

{
  "id": "Poster_Banner_Printing",
  "path": "PRINT_MENU | Poster_Banner_Printing",
  "depth": 2
}

```

]  
}

---

<div class="post-metadata">

**Author:** ![vosy](https://forum.alumio.com/letter_avatar_proxy/v4/letter/v/ecd19e/32.png) [@vosy](https://forum.alumio.com/u/vosy)\
**Post date:** [June 3, 2025, 10:58am UTC](https://forum.alumio.com/t/get-category-path-with-highest-depth/2031/2 "2025-06-03T10:58:37Z")

</div>

value setter and JMESpath  
&{max\_by(category\_tree\_result, &depth).path}

---

<div class="post-metadata">

**Author:** ![m.arief](https://forum.alumio.com/user_avatar/forum.alumio.com/m.arief/32/1568_2.png) [@m.arief](https://forum.alumio.com/u/m.arief)\
**Post date:** [June 6, 2025, 8:39am UTC](https://forum.alumio.com/t/get-category-path-with-highest-depth/2031/4 "2025-06-06T08:39:11Z")

</div>

Hi @vosy,

Could you please confirm whether you already have solved your problem by using the mentioned value setter and JMESpath below?

```auto
&{max_by(category_tree_result, &depth).path}

```

If not yet, could you please share the expected result in Json?

---

<div class="post-metadata">

**Author:** ![vosy](https://forum.alumio.com/letter_avatar_proxy/v4/letter/v/ecd19e/32.png) [@vosy](https://forum.alumio.com/u/vosy)\
**Post date:** [June 6, 2025, 8:53am UTC](https://forum.alumio.com/t/get-category-path-with-highest-depth/2031/5 "2025-06-06T08:53:00Z")

</div>

Hi, yea it solved my problem, thank you very much! 🙂
