<PackageReference Include="NJsonSchema" Version="7.4.6218.34172" />

JsonPathUtilities

public static class JsonPathUtilities
Utilities to work with JSON paths.
public static string GetJsonPath(object rootObject, object searchedObject)

Gets the JSON path of the given object.