How to check if a value exists in a nested dictionary

I have this as my nested dictionary
image

suppose i only have two values, out of tag 2 and tag 3 I have tag 2, and I have the value that is at the last say C.

I want the path to the value C from tag 2.

didnt help

Have read, understood and tested in less than 5 minutes … Tags, Got, Get, Bucket, Dictionary, Key …
I’ll turn on the computer …

i have already tested that method, i searched the community before posting

Set project bucket to : tag 1/tag 2/tag 5/tag 10

Get value for tag tag 18
Value return c

i dont know anything in between, i just know tag 2 n value c

Try this


Then you go (Do it) in each block to test what value it is taking from the tag

Go testing, you get the value you want
Screenshot_2

i could have tried this but the length of the path is variable it may be 2 steps down or 7 steps down or anything

This variation 2. .7 is a result of your algorithm. You know when it will be 2 or 5 or 6 or 18 … Then use the bucket / path according to your algorithm …

1 Like