Build JObject from JSONPath

Viewed 1511

I'm a bit new to using the Newtonsoft JSON library for .NET. Is there any way to create a JObject or JToken from a JSONPath?

So for example something like the following.

string jsonPath = "$.ArrayA[0].ArrayB[0].Property";
JObject jObj = JObject.FromJSONPath(jsonPath); // SOMETHING LIKE THIS

The result would be a JObject or JToken that looks like this.

{
    "ArrayA": [{
        "ArrayB": [{
            "Property": ""
        }]
    }
}
1 Answers
Related