U
U
Uncle Bogdan2022-02-15 12:27:30
JSON
Uncle Bogdan, 2022-02-15 12:27:30

How to get value by key in json?

I know it's a stupid question, but I can't get the key by value from this json.

I'm trying to do this with Newtonsoft, but it doesn't work.

var json = JsonConvert.SerializeObject(result);

        var title = JObject.Parse(json)["title"];

        print(title);


Gives an error message:

JsonReaderException: Error reading JObject from JsonReader. Current JsonReader item is not an object: String. Path '', line 1, position 456.


JSON:

620b713ae89a6051574174.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question