Skip to Content
1
Feb 06, 2020 at 08:38 AM

Create JSON using SAC Designer Result Set API

436 Views

Hi All,

I am trying to figure a way out whether an API exists to get resultset when a data point in a table has more than 1 measure so that I can create a json string to pass to a Custom Widget based on the SAC Table. This is an imported model but just should not matter.

I have a table on a the Best Run Advanced Model example below

table-from-model.png

Data using resultset API is as below

console-log.pngThe resultant json I require is something like this. Is

[
  {
    "state":"California",
    "Store":"Second Hand",
    "Quantity sold Plan":79321,
    "Gross Margin":1087506
  },
  {
    "state":"California",
    "Store":"Ozzy",
    "Quantity sold Plan":811586,
    "Gross Margin":950619
  }
] 

Is there a simpler way of doing this in SAC Designer , any pointers would be helpful

Cheers

Afshin

Attachments

console-log.png (24.2 kB)