# DataGrid - Pass value from JSON

**URL:** <https://forum.radzen.com/t/datagrid-pass-value-from-json/5920>\
**Category:** Radzen.Blazor Components\
**Created:** [December 5, 2020, 11:29am UTC](https://forum.radzen.com/t/datagrid-pass-value-from-json/5920 "2020-12-05T11:29:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmichael](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@mmichael](https://forum.radzen.com/u/mmichael)\
**Post date:** [December 5, 2020, 11:29am UTC](https://forum.radzen.com/t/datagrid-pass-value-from-json/5920/1 "2020-12-05T11:29:52Z")

</div>

I am getting, from a REST API (GET method), a list of objects ( IList ) like this one:

```
 {
    "id": 1,
    "location": {
      "coordinates": [
        2,
        2,
        2
      ],
      "type": "point"
    },
    "name": "TEST",
    "type": "TEST"
  }

```

I use this REST API as Data source for my Radzen Grid. All properties are displayed normally except the coordinates.

e.g. for the first element of the coordinates, I used this line of code:  
`<RadzenGridColumn Width="200px" TItem="Robot" Property="location.coordinates[0]" Title="Coordinates">`  
but the value is not displayed. Instead, the name of the class is returned.

The definition of the class Robot is the following:

```
            public partial class Robot
            {
                [JsonProperty("id")]
                public int? id { get; set; }

                [JsonProperty("location")]
                public Location location { get; set; }

                [JsonProperty("name")]
                public string name { get; set; }

                [JsonProperty("type")]
                public string type { get; set; }
            }

            public partial class Location
            {
                [JsonProperty("coordinates")]
                public double[] coordinates { get; set; }
                
                [JsonProperty("type")]
                public string type { get; set; }
            }
```

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [December 5, 2020, 3:45pm UTC](https://forum.radzen.com/t/datagrid-pass-value-from-json/5920/2 "2020-12-05T15:45:36Z")

</div>

Hi @mmichael,

The RadzenGrid does not recognize this expression because it isn't a property name. Try with the Template of the column:

```auto
<RadzenGridColumn Width="200px" TItem="Robot" Title="Coordinates">
 <Template Context="data">
    @data.location.coordinates[0]
 </Template>
</RadzenGridColumn>

```

---

<div class="post-metadata">

**Author:** ![mmichael](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@mmichael](https://forum.radzen.com/u/mmichael)\
**Post date:** [December 5, 2020, 6:56pm UTC](https://forum.radzen.com/t/datagrid-pass-value-from-json/5920/3 "2020-12-05T18:56:34Z")

</div>

This works fine. Thank you very much for the instant reply!
