Since GA4.3.0 it has been possible to extract data from JSON file structures. This can be done either through a stream provided by webmon or directly from a file.
Before extraction, the JSON dato is converted into XML, and the structure changes accordingly. In the conversion an additional top layer (/object) is added to the tree.
So looking at this:
This will be converted into:
<?xml version="1.0" encoding="UTF-8"?>
As you can see, all headers are converted straight into tag names instead of attributes, which makes it more diffucult to rotate around children tags. In normal XML we would rotate around all children in data by using
/object/content/data/tr (or similar end tag)
row names would be created for each child seen and we could only extract the value.
In this case we can rotate around
/object/content/data/* where rownames would be created using "name()" and value would be extracted using "text()"
The finished XML would look like this:
<sampler name="JSON Extractor">