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

View File

@ -624,7 +624,7 @@ func main() {
if record.GetString("is_chart") == "false" { if record.GetString("is_chart") == "false" {
// Extract `card_type` JSON from `record.Get("card_type")` // 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 requestJSON, err := json.Marshal(requestData) // Convert interface{} to JSON string
if err != nil { if err != nil {
fmt.Println("Error encoding request data:", err) fmt.Println("Error encoding request data:", err)
@ -669,10 +669,12 @@ func main() {
"unset_value": record.Get("unset_value"), "unset_value": record.Get("unset_value"),
"card_logo": logoURL, "card_logo": logoURL,
"order_id": record.Get("order_id"), "order_id": record.Get("order_id"),
"card_type": record.Get("card_type"), "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" { if record.GetString("is_chart") == "true" {
recordResult["response"] = cRes recordResult["response"] = cResRaw
} else { } else {
recordResult["response"] = cardResults 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.