Only get arrayname?

Hey everyone

I am doing an API request and get back information that looks like this:

image

The JSON itself looks like this:
image

The HTTP Module parses the value and runs it through an Iterator.

However now I only want the get the name of the bearer_message only, not the value of the array inside.

In this example I would only want LockDoesNotConnect, but not the array itself, just the name.
This bearer_message can be different from just this example here are a few: LockDoesNotConnect
ParcelTooBigForMailBox
LockDoesNotOpen
Other
CouldNotFindMailbox
MailboxNotAccessible

Everything I’ve tried I get the value of the array like this 2023-04-17 08:55:34.000Z, 2023-04-17 08:55:34.000Z but what I want to get is just LockDoesNotConnect which is the name of the array.

How can I do this?

Thanks in advance

What you can do is utilize keys function to do this.

{{first(keys(1.bearer_message))}}

If there is multiple bearer_message, which I don’t think is the case, you can simply use {{keys(1.bearer_message)}} which will return all data as an array.

Thank you very much for this

I’ve tried both first and keys but didn’t combine those 2, this did it.