Chart type json , tab order : GWM

This commit is contained in:
Gowtham M 2025-02-14 11:08:58 +05:30
parent 59de2e648e
commit bbe9e2db9c
7 changed files with 11 additions and 9 deletions

20
main.go
View File

@ -624,7 +624,7 @@ func main() {
if record.GetString("is_chart") == "false" {
// Extract `card_type` JSON from `record.Get("card_type")`
requestData := record.Get("card_type")
requestData := record.Get("card_type_json")
requestJSON, err := json.Marshal(requestData) // Convert interface{} to JSON string
if err != nil {
fmt.Println("Error encoding request data:", err)
@ -663,16 +663,18 @@ func main() {
"is_chart": record.GetString("is_chart"),
"chart_type": record.GetString("chart_type"),
// "response": record.GetString("is_chart") = true cRes : cardResults,
"group_by": record.GetString("group_by"),
"chart_heading": record.GetString(chartHeadingKey),
"tab_heading": record.GetString(tabHeadingKey),
"unset_value": record.Get("unset_value"),
"card_logo": logoURL,
"order_id": record.Get("order_id"),
"card_type": record.Get("card_type"),
"group_by": record.GetString("group_by"),
"chart_heading": record.GetString(chartHeadingKey),
"tab_heading": record.GetString(tabHeadingKey),
"unset_value": record.Get("unset_value"),
"card_logo": logoURL,
"order_id": record.Get("order_id"),
"card_type_json": record.Get("card_type_json"),
"tab_order": record.GetString("tab_order"),
"chart_type_json": record.Get("chart_type_json"),
}
if record.GetString("is_chart") == "true" {
recordResult["response"] = cRes
recordResult["response"] = cResRaw
} else {
recordResult["response"] = cardResults
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.