Click here to Skip to main content
15,792,496 members

Comments by Rajesh Kumar 2013 (Top 66 by date)

Rajesh Kumar 2013 19-Oct-23 8:05am View    
Deleted
Thanks for you valuable reply. how could I do this inside razor page?
Rajesh Kumar 2013 17-Aug-23 2:05am View    
I need to check k.Value only from 'jsonDictionary' varible and also need to compare the values to 'blocked' variable. If k.Value is contain any value from 'blocked' list then need to find out. How can I do with HashSet in c#?
Rajesh Kumar 2013 17-Aug-23 1:37am View    
Okay, can you please update with answer by using HashSet instead of using Dictionary regarding the 'PIEBALDconsult' comment? Because, still I can not find the 'select' and 'create' words from 'matches' variable.
Rajesh Kumar 2013 17-Aug-23 0:14am View    
Here
matches
getting empty, but 'levels' list containing a 'create' word that one should be find. It is not finding now, why?
string jsondata = @"{""Id"":null,""FName"":""Raj"",""LName"":""Denny"",""DateofJoining"":null,""Date"":""2023 - 08 - 01T00: 00:00"",""CreatedBy"":""ICC0000389"",""levels"":{""RoleId"":""0"",""RoleName"":""select"",""IsActive"":false,""CreatedDate"":null,""CreatedBy"":""Admin""},""functionalities"":[{""levelID"":0,""levelName"":""create""}],""functionalityList"":[]}";
var jsonDictionary = JsonConvert.DeserializeObject<Dictionary<object, object>>(jsondata).ToDictionary(k => k.Key, k => (k.Value ?? ""));
var jsonDictionaryList = jsonDictionary.Select(x => x.Value.ToString().ToUpper().Trim());

var matches = blockedList.Intersect(jsonDictionaryList);
Rajesh Kumar 2013 16-Aug-23 23:44pm View    
How can I use HashSet instead of Dictionary regarding my question?