All these years when I needed a nested data object to create something like a pivot table, I had to get multiple HyperCubes and then refactor them to have one big object with all of the data so we can display them in a webpage.
Few weeks ago I came across the new GetHyperCubeTreeData method (note that it has a stability index of Experimental). This basically retrieves data in a nested tree with qNodes. Each qNode represents a Dimension with an array of all the values and the qValues is an array of all of the Measures values.
In this example I am connecting to the general Helpdesk app and I will try to create a simple Pivot Table.
The first level of data will come from 'Status' and the seconds level from 'Case Owner Group'. The measure will be '=Count([Case Count])'.