我想为此文档(模型)显示一个网格:
{
id: "53f7ba4b30d2317912fc8004",
title: "Hellow world",
on_slideshow: false,
country: {
name: "United state",
country_code: "US"
}
tags: [
{
name: "backbonejs"
object_id: "72691"
},
{
name: "backgrid"
object_id: "72692"
}
]
}
在我的 js 文件中..
var grid = new Backgrid.Grid({
columns: [{
name: "title",
label: "Title",
cell: "string"
},
{
name: "country",
label: "Country",
cell: "string"
},
{
name: "on_slideshow",
label: "Slide",
cell: "boolean"
},
{
name: "tags",
label: "Tags",
cell: "string"
},
{
name: "pub_date",
label: "Publiched",
cell: "string"
}],
collection: articles
}).render();
标签显示为 [object Object]、[object Object] 和国家根本没有显示。
如何正确显示它们,标签的名称和国家列表?