I am consuming an API that returns JSON that looks like this:
{
"lookup_table_data": [
[
{
"key": "id",
"value": 0
},
{
"key" : "label",
"value" : "something"
}
],
[
{
"key": "id",
"value": 1
},
{
"key" : "label",
"value" : "something_else"
}
]
]
}
I made a class that I deserialize the json object into that looks like this:
public class LookupResponseModel
{
public Lookup_Table_Data[][] Lookup_table_data { get; set; }
public class Lookup_Table_Data
{
public string Key { get; set; }
public object Value { get; set; }
}
}
Now imagine that the JSON response has over 1,000 records instead of the 2 that I gave in my example.
I am wanting to search through my model and be able to find where the value of the key "id" is equal to 1 - because I want to use the label key value of "something_else".
How would I be able to grab the label "something_else" with an id of 1 with this model?