Unfortunately, the JSON Splitter snap does not expose the fully resolved path to the element being output. I’ve filed a feature request to add this functionality. In the meantime, you’ll need to use a Mapper with an expression to add the parent key name into the child object. For instance, the following expression will transform the input document to add a “parent” property to all objects with the name of the parent:
$.mapValues((v, k) => v instanceof Object ? v.extend({parent: k}) : v)
Since you’re transforming the whole input document, you’ll want to use $
as the output document.
Then, in the JSON Splitter, you can use the ‘Include scalar parents’ option to have the ‘parent’ property added into the output documents.