Use payload value as payload

hi
I don’t know if it’s possible, but I would like some help
I need to fetch information in a payload. but the path is inside another payload.
I know it’s confusing, I’ll try to explain it hahaha
example:
I’m using a node loop, because I’m going to need to perform the extraction of information, but each time the loop executes it will fetch the information at a different address


the information i need to look for is this


the payload I need to look for is this

another way I could use it would be something like this:
image
but the payload {{working.value.numero-cadastro}} does not fetch the payload value, but remains as a string

image
was to look for this value

image
that’s how it works

can you help me?

Hi @Jonatas_Liasch,

If I understand your problem correctly, while in the loop, say on the second iteration of 10, you are trying to get a value from somewhere else on the root payload based on a path provided in the current context the loop is on (in this case the second). Do I understand this correctly?

Could you explain a little about what your use case is? You mentioned “perform the extraction of information”, but could you tell me more about your end goal? I might be able to give you a better solution if I have more information.

Thank you,
Heath

hi @Heath
I’ll try to explain it another way, because I almost didn’t understand what I wrote, hahaha.
this problem does not only happen in the loop. (I mentioned the loop. because that’s where I would use it)
I’ll use mutate node as an example:

image

I need the source path to be variable, according to this path that is between the braces.


in this example the correct source path would be
“plants.body.data.[6].status”

but when I click on the virtual button, that source path is not found

is there any expression or node that solves this problem?

thank you for your help

@Jonatas_Liasch

Thank you for the clarification, I do understand your question much better now!

What you’re looking for is the lookup helper. We have an example of how to use this in our Template Tester.

Let me know if this works for you.

Thank you,
Heath

hi @Heath
this solution worked perfect
thanks :grinning: :grinning: