© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
36 replies
mrdudebro1

Working with jsonnode class

Working with JsonNode class. Is there any function or property to get the various key value pairs? Would jsonDocument be better? I have a string I got from an http request and I need to manipulate the data. One example of the json is below. all other entries are similar. Certain values omitted for security.
{
  "LicenseUsageList": [
    {
      "UserName": "doman\\username",
      "LicenseType": "license type",
      "AcquisitionTime": "2023-10-12T08:04:52.523",
      "SessionType": "UISERVER-FULL",
      "SessionId": "session id",
      "LicenseProperties": [
        {
          "Key": "DbServerPid",
          "Value": "64"
        },
        {
          "Key": "ProgramName",
          "Value": "program name"
        },
        {
          "Key": "DbExecutionContextId",
          "Value": "0"
        },
        {
          "Key": "Name",
          "Value": "app name"
        },
        {
          "Key": "LoginName",
          "Value": "user name"
        },
        {
          "Key": "LoginTime",
          "Value": "10/12/2023 08:04:52"
        },
        {
          "Key": "HostName",
          "Value": "server name"
        },
        {
          "Key": "HostPid",
          "Value": "hostPid"
        }
      ]
    },
  ]
}
{
  "LicenseUsageList": [
    {
      "UserName": "doman\\username",
      "LicenseType": "license type",
      "AcquisitionTime": "2023-10-12T08:04:52.523",
      "SessionType": "UISERVER-FULL",
      "SessionId": "session id",
      "LicenseProperties": [
        {
          "Key": "DbServerPid",
          "Value": "64"
        },
        {
          "Key": "ProgramName",
          "Value": "program name"
        },
        {
          "Key": "DbExecutionContextId",
          "Value": "0"
        },
        {
          "Key": "Name",
          "Value": "app name"
        },
        {
          "Key": "LoginName",
          "Value": "user name"
        },
        {
          "Key": "LoginTime",
          "Value": "10/12/2023 08:04:52"
        },
        {
          "Key": "HostName",
          "Value": "server name"
        },
        {
          "Key": "HostPid",
          "Value": "hostPid"
        }
      ]
    },
  ]
}


I'd like to access each node via the "UserName" property and find duplicate values
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ working with classes and they arent working
C#CC# / help
3y ago
❔ Class with Func<> and class initializers
C#CC# / help
3y ago
Static class or regular class with interface?
C#CC# / help
14mo ago
Mocking derived class with abstract base class
C#CC# / help
4y ago