Search code examples
backgrid

displaying nested attributes in backgrid


I have a json object in the following format:

{
    properties:{
                  url:"http://..."
               }
}

And I want to display the url in a Backgrid grid. However, I can't figure out how to change the name attribute of the column such that it accesses the nested url. I have tried the following examples to no avail:

{
    name: "properties.url",
    label: "URL",
    cell: "uri"
}

And

{
    name: "properties[url]",
    label: "URL",
    cell: "uri"
}

It seems like a simple enough thing to do but I can't find an answer.


Solution

  • Take a look at Backbone's Wiki.

    There are at least 4 choices: