I want to convert a CellSet object (which is the result of an MDX request to SSAS) into a valid JSON format that will expand the capabilities of some cards on the client side.
The following is an example query.
SELECT
[Measures].[Sales Amount - Reseller Sales] ON COLUMNS,
NON EMPTY
GENERATE (
[Sales Territory].[Sales Territory Country].MEMBERS,
[Sales Territory].[Sales Territory Country].CURRENTMEMBER
*
TOPCOUNT(
[Product].[Category].[Category].MEMBERS,
5,
[Measures].[Sales Amount - Reseller Sales]
)
)
ON ROWS FROM [Analysis Services Cube]
Below is the result of the query.
MDX query result
How do I convert the result to a JSON object? I am confused how to form a key / value pair from a multidimensional result set.
Thanks for any help.
source
share