type Orders struct {
data []struct {
href string `json:"href"`
order_id string `json:"order_id"`
} `json:"data"`
}
How do I insert data in to data array struct in orders struct?
orders.data = append(orders.data, orders.data{ href: r.Host+r.URL.Path+"/"+orderid, order_id: orderid})
it errors. What's wrong?