Ankit  Shukla

Ankit Shukla

  • NA
  • 681
  • 117.6k

Break data from json and bind with datagrid.

Mar 8 2017 2:03 AM
Hello;
 
I have a json file(API) and need to fetch some data and bind with datagrid
 
My JSON FIle is:
 
{
"records": [
{
"status": null,
"version": 1,
"id": "89fc25ea-721b-42ca-9ff1-756a7d386dd8",
"created_at": "2017-02-15T04:29:23Z",
"updated_at": "2017-02-15T04:29:23Z",
"client_created_at": "2017-02-15T04:24:44Z",
"client_updated_at": "2017-02-15T04:29:08Z",
"created_by": "Graham Patterson",
"created_by_id": "571fdc4a-28ee-4fd8-8c2d-7d6758f3910f",
"updated_by": "Graham Patterson",
"updated_by_id": "571fdc4a-28ee-4fd8-8c2d-7d6758f3910f",
"created_location": null,
"updated_location": null,
"created_duration": 264,
"updated_duration": 264,
"edited_duration": 264,
"form_id": "a8ac8685-21d4-4e72-9ecc-705254fb3f80",
"project_id": null,
"assigned_to": null,
"assigned_to_id": null,
"form_values": {
"6963": {
"other_values": [],
"choice_values": [
"Fine",
"Hot",
"Sunny"
]
},
"7705": "Xyz",
"e7ba": "Structure number",
"c353": "Name of line\n",
"576f": [
{
"id": "4d7acf29-c342-4c2c-95d9-ea3c57efa10f",
"created_at": "1487132878",
"form_values": {
"3962": "Issue 1",
"bd46": [
{
"caption": null,
"photo_id": "3d68109b-fd3f-4d77-9634-a872daca87b7"
}
]
},
"geometry": null,
"created_duration": 18,
"updated_at": "1487132896",
"updated_duration": 18,
"edited_duration": 18,
"version": 1,
"created_by_id": "571fdc4a-28ee-4fd8-8c2d-7d6758f3910f",
"updated_by_id": "571fdc4a-28ee-4fd8-8c2d-7d6758f3910f",
"changeset_id": "6a0ac5b9-0063-4993-a0eb-0ea448b232bf"
},
{
"id": "49541964-4a2e-414b-bcd9-76863004ee59",
"created_at": "1487132899",
"form_values": {
"3962": "Issue 2",
"bd46": [
{
"caption": null,
"photo_id": "1d1434c7-6795-47f7-aa98-33fb550dcaa7"
}
]
},
"geometry": null,
"created_duration": 13,
"updated_at": "1487132912",
"updated_duration": 13,
"edited_duration": 13,
"version": 1,
"created_by_id": "571fdc4a-28ee-4fd8-8c2d-7d6758f3910f",
"updated_by_id": "571fdc4a-28ee-4fd8-8c2d-7d6758f3910f",
"changeset_id": "6a0ac5b9-0063-4993-a0eb-0ea448b232bf"
}
],
"cf63": [
{
"created_location": {
"latitude": -27.2264784317734,
"longitude": 152.984398535856,
"altitude": 26,
"horizontal_accuracy": 65
},
"id": "8a3a27c5-69d0-4017-85b6-1e52aefc2717",
"created_at": "1487132922",
"form_values": {
"794f": {
"other_values": [],
"choice_values": [
"U71-776"
]
}
},
"geometry": {
"type": "Point",
"coordinates": [
152.984398535856,
-27.2264784317734
]
},
"updated_location": {
"latitude": -27.2264784317734,
"longitude": 152.984398535856,
"altitude": 26,
"horizontal_accuracy": 65
},
"created_duration": 6,
"updated_at": "1487132929",
"updated_duration": 6,
"edited_duration": 6,
"version": 1,
"created_by_id": "571fdc4a-28ee-4fd8-8c2d-7d6758f3910f",
"updated_by_id": "571fdc4a-28ee-4fd8-8c2d-7d6758f3910f",
"changeset_id": "6a0ac5b9-0063-4993-a0eb-0ea448b232bf"
},
{
"created_location": {
"latitude": -27.2264784317734,
"longitude": 152.984398535856,
"altitude": 26,
"horizontal_accuracy": 65
},
"id": "6bc31253-1512-415c-94d4-d243f42b0d29",
"created_at": "1487132937",
"form_values": {
"794f": {
"other_values": [],
"choice_values": [
"680-SZJ"
]
}
},
"geometry": {
"type": "Point",
"coordinates": [
152.984398535856,
-27.2264784317734
]
},
"updated_location": {
"latitude": -27.2264784317734,
"longitude": 152.984398535856,
"altitude": 26,
"horizontal_accuracy": 65
},
"created_duration": 5,
"updated_at": "1487132942",
"updated_duration": 5,
"edited_duration": 5,
"version": 1,
"created_by_id": "571fdc4a-28ee-4fd8-8c2d-7d6758f3910f",
"updated_by_id": "571fdc4a-28ee-4fd8-8c2d-7d6758f3910f",
"changeset_id": "6a0ac5b9-0063-4993-a0eb-0ea448b232bf"
}
],
"5dd8": "10:29",
"d0c9": {
"other_values": [],
"choice_values": [
"Back to base Training - 12003"
]
},
"e17c": "Work completed today",
"7f8a": {
"other_values": [],
"choice_values": [
"Staff"
]
},
"f3af": "2017-02-15",
"06ab": [
{
"id": "7e4e4b66-1256-46e1-8f2b-b5afa339e6f9",
"created_at": "1487132693",
"form_values": {
"2533": "14:24",
"34f7": "yes",
"96d2": {
"other_values": [],
"choice_values": [
"112.78"
]
},
"719c": {
"other_values": [],
"choice_values": [
"Gerald Clifton"
]
},
"54b0": "14:24"
},
"geometry": null,
"created_duration": 11,
"updated_at": "1487132705",
"updated_duration": 11,
"edited_duration": 11,
"version": 1,
"created_by_id": "571fdc4a-28ee-4fd8-8c2d-7d6758f3910f",
"updated_by_id": "571fdc4a-28ee-4fd8-8c2d-7d6758f3910f",
"changeset_id": "6a0ac5b9-0063-4993-a0eb-0ea448b232bf"
},
{
"id": "77d5fc68-0929-4ab0-97fa-2cdd0f24e015",
"created_at": "1487132706",
"form_values": {
"2533": "14:25",
"34f7": "no",
"96d2": {
"other_values": [],
"choice_values": [
"112.78"
]
},
"719c": {
"other_values": [],
"choice_values": [
"Maxinr Rhind"
]
},
"54b0": "08:25"
},
"geometry": null,
"created_duration": 22,
"updated_at": "1487132728",
"updated_duration": 22,
"edited_duration": 22,
"version": 1,
"created_by_id": "571fdc4a-28ee-4fd8-8c2d-7d6758f3910f",
"updated_by_id": "571fdc4a-28ee-4fd8-8c2d-7d6758f3910f",
"changeset_id": "6a0ac5b9-0063-4993-a0eb-0ea448b232bf"
}
],
"bf00": "14:27",
"dd43": "Bus was late"
},
"latitude": null,
"longitude": null,
"altitude": null,
"speed": null,
"course": null,
"horizontal_accuracy": null,
"vertical_accuracy": null
}
]
}
 
 
I need to fetch values of "createdby" ,"bf00","d0c9" and "7705" and need to bind in datagrid in windows application. Please help. 

Answers (3)