I have a collection of key-value pairs that are being returned by post to which I am adding to a list. I would like to append a value based upon the key. In the example below, the for loop appends the key and calls a function (Boolean) that appends either a yes or no depending on the value.
What I would like to do is check the key name and IF the key begins with "chk" perform the loop below, ELSE IF, the key begins with anything else, I would like to append the value to the key.
I'm not sure how to reference the value of the key in code. Thanks in advance.
for (int i = 0; i < newKeys.Length; i++ )
{
sb.Append(newKeys[i] + ",\"" + Boolean(fc[newKeys[i]]) + "\",<br />");
}