I am using C# to grab values from a JSON file and put them into a database. I am new to JSON and so don't really know too much of how to work with it. I will do my best to explain the structure I have and what I am trying to do. But to sum up I am trying to call a variable from JSON in a similar way you would do in an SQL Where statement. So grab this value where this other value = x.
So the JSON format is as follows. Firstly it idenfitifies the columns.
"columns": [
{
"id": 8098453499733892,
"index": 0,
"title": "Task Name",
"type": "TEXT_NUMBER",
"format": ",,,,,,2,,,,,,,,,1",
"primary": true,
"width": 378
},
{
"id": 780104105256836,
"index": 1,
"title": "KPI (RYG)",
"type": "PICKLIST",
"symbol": "RYG",
"options": [
"Red",
"Yellow",
"Green"
],.....
Then the rows and cells within that:
"id": 2157159933863812,
"rowNumber": 2,
"parentRowNumber": 1,
"parentId": 7786659468076932,
"expanded": false,
"format": ",,1,,,,,,,22,,,,,,",
"createdAt": "2015-03-04T15:58:28+13:00",
"modifiedAt": "2015-03-04T15:58:32+13:00",
"cells": [
{
"columnId": 8098453499733892,
"type": "TEXT_NUMBER",
"value": "GLH Toll MASTER FROM WEEK 47",
"displayValue": "GLH Toll MASTER FROM WEEK 47",
"format": ",,1,,,,2,,,22,,,,,,1"
},
{
"columnId": 2750428942231428,
"type": "CHECKBOX",
"value": true,
"format": ",,1,,,,,,,22,,,,,,"
},
Ok so for an example. What I want to do is grab the columnID value in the cell, and then use that to find the title value in the column. So in the above example, I would want to find 'title' where id in column equals 8098453499733892, which would give me the result of 'Task Name'.
I don't even know if this is possible but have struggled to find a working example on the web. FYI I am using smartsheets.