18 Oct 2023 04:47 AM - last edited on 19 Oct 2023 02:11 PM by MaciejNeumann
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.
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
21 Feb 2024 03:40 PM
Hey Nikhil did you figure this one out?
21 Feb 2024 08:47 PM
Hi Calfano,
Nope, I see only 1 record matched and returned.
Kind Regards,
Nikhil
21 Feb 2024 09:58 PM
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)?"""
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.
22 Feb 2024 12:46 AM
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
05 Aug 2024 12:01 PM
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?