cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Get Specific Properties from All Elements in an Array using Biz Events Capture?

victoria
Participant

I am setting up biz events capture and would like to be able to get certain fields from each element in an array without getting the entire array.

I do not know the size of the array ahead of time.

 

Example:

If my request body looks like this:

 

{
    "myArray": [
        {
            "id": 1,
            "name": "Jane"
        },
        {
            "id": 5,
            "name": "Jerry"
        }
    ],
    ...
}

 

 

I would want the biz events to capture only the names, so something like ["Jane", "Jerry"], doesn't necessarily have to  be in an array for output.

 

I know that I could use "request.myArray.0.name" to get "Jane" but not sure how to get ALL the names.

 

thanks for any input!

3 REPLIES 3

Hi @victoria 

you can define a function to return all values in the array.

BR,

Peter.

Hi @victoria 

you can refer to Dynatrace documentations: ba-business-events-capturing 

BR, 

Peter

victoria
Participant

Hi @Peter_Youssef,

 

I know I can create a function or parse in DQL but I am looking to do this "filtering" when the biz event is captured, which is not mentioned in this documentation unless I am missing something.

 

I do not want all fields of the complex objects inside the array to get captured because they contain sensitive information.

Thanks,

Victoria

Featured Posts