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

Parsing Large Arrays

nikhkrish
Observer

Hi There,

I have a scenario where large array need to be parsed, I was following an example mentioned on the Dynatrace Documentation mentioned here. But looks like it does not work. 

nikhkrish_0-1697600555444.png

nikhkrish_1-1697600583785.png
It only matches 1 record and only 1 record is returned. I am expecting 3 records to be returned as shown in the example documentation.

May be I am missing something here.
Need some help to parse such JSON Arrays. 

Kind Regards,
Nikhil

5 REPLIES 5

calfano
Helper

Hey Nikhil did you figure this one out?

nikhkrish
Observer

Hi Calfano,

Nope, I see only 1 record matched and returned.

Kind Regards,
Nikhil

Dant3
Pro

The example works just fine from the functionality pov. It might be a bug in the UI, or only showing the first process result (most likely).

The single array is being process and transformed in 3 records, let simulate the process:

data json:"""
[
{"id":"1","a":[3,6],"b":{"foo":"bar"}},
{"id":"2","a":[30,2673,1]},
{"id":"999","test":[999]},
{"id":"256000","a":[256,1193,2],"b":{"foo":"nobar"}}
],
""""
| parse content,
"""(BOF '[')?
JSON_OBJECT{INT+:id}(greedy='others'):registro ','?
(']' EOF)?"""

 

Dant3_0-1708552517635.png

The data:json is a single record actually, did a single line per object to better show the example in the UI and the result.

Services Solution Engineer @PowerCloud - Observability/CloudOps Certified / Former SE @Dynatrace.

nikhkrish
Observer

Hi,

Sorry, I am a bit confused here. The registro field in your example above should actually be showing the values of a, b and test fields I think. But its null.

Kind Regards,
Nikhil

luizpolli
Visitor

Here is not working as well!
Tried to do the same example as the doc says and the result is still showing one record.
Any idea on that?

Featured Posts