Take only value from json

FurnariFurnari Member ✭✭

Hi everyone,
after deserialize a json, how i can take only the value of "id_token" into a string?

there is my json


Thanks in advance.


Best Answer


  • FurnariFurnari Member ✭✭

    @JoeManke my json is not always the same, then i parse the content of response.

    Here is the code :

    var content = response.Content;

    var jsonObject = JObject.Parse(content);
    string token = jsonObject.Value("id_token");

    token contains only the value.

    Thanks a lot.

Sign In or Register to comment.