Since GA4.4 it has been possible to extract data from JSON file structures using the Extractor plugin. This can be done either through a stream provided by Webmon or directly from a file.
Before extraction, the JSON data 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 difficult 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 row names would be created using "name()" and value would be extracted using "text()"
The finished XML would look like this:
<sampler name="Extractor JSON file">
The dataview would look like this: