func (c *UserController) ChatMsgList() {

o := orm.NewOrm()

qs := o.QueryTable("chat_msg")

var list []orm.Params

qs.OrderBy("Id").Limit(2).Values(&list)

beego.Info(list)

var uids []int

//list就是上面的数据,我该如何获取这个集合里的Uid的集合(数组)

for key, value := range list {

beego.Info(key)

uids = append(uids, value["Uid"])

}

beego.Info(uids)

//c.Data["list"] = list

//

//c.TplName = "user/chatMsgList.html"

c.Data["json"] = list

c.ServeJSON()

}