Q:

Get absolute path of JSON object

I have a JSON object: 
{
  ""settings"": {
    ""general"": {
      ""database"": { ""type"": ""PostgreSql"" }
    }
  }
}

The absolute path of my JSON object would look like this: settings/general/database/type
I tried to get all the keys with the first solution of this question:
IList<string> keys = parent.Properties().Select(p => p.Name).ToList();

This didn't work for me. The keys list only contained the first key settings and hasn't got the other ones.
There is a path property which shows the path of the node you are in but it doesn't show the complete path of the JSON object.

How can I get the absolute path like in my example?

A:

In your question you are asking how to get the path to "my JSON object", but your sample JSON actually contains four objects, nested.  (Each object begins with { and ends with } in the JSON.)  So the path will be different depending on which JSON object you are referring to.  It looks like you currently have a reference to the outermost object which you are querying to get the names of its properties.  But this won't give you the descendant properties, as you've seen.  What you need is to get the Path from the innermost property.
So I think we can boil your question down to this: 

Given some JSON, how do I get the full path(s) to the deepest value(s) within the hierarchy (i.e. the leaf nodes)?

You can do that with this LINQ-to-JSON query:
var obj = JObject.Parse(json);

var paths = obj.DescendantsAndSelf()
               .OfType<JProperty>()
               .Where(jp => jp.Value is JValue)
               .Select(jp => jp.Path)
               .ToList();

If you only want the first one, then replace .ToList() with .FirstOrDefault().
Note that the path(s) will be returned with dots as delimiters.  If you would prefer slashes, then add .Replace('.', '/') to jp.Path within the Select() method call.
Working demo here: https://dotnetfiddle.net/lFXtEE

