Hi folks,
Here is my code:
List<KeyValuePair<string, string>> attributeList = new List<KeyValuePair<string, string>>(); while (ienum.MoveNext()) { string attributeName = attribute.Name; string attributeVal = attribute.StringValue; // rest omitted if (attributeName == "sAMAccountName" || attributeName == "mail" || attributeName == "displayName" || attributeName == "telephoneNumber" || attributeName == "mobile") { attributeList.Add(new KeyValuePair<string, string>(attributeName, attributeVal)); } } return Ok(attributeList);
Output:
It seems ok but i want to display output like:
[ {"displayName" : "*****" }, {"telephoneNumber":"*****" }, {"mobile": "******" }, ..... //Rest Omitted ..... ]
Is It possible to hide key and value? If yes then how?
I am waiting for your response.
Thanks in advance