znai icon indicating copy to clipboard operation
znai copied to clipboard

Include in include-json to preserve structure

Open tsiq-karold opened this issue 7 years ago • 2 comments

For example, if the json is:

{
    a: b,
    c: {
        d: e,
        f: g
    }
}

and you include c.d, you currently get d: e. Would be nice to optionally preserve the structure and return:

{
    c: {
        d: e
    }
}

tsiq-karold avatar Jul 02 '18 12:07 tsiq-karold

@tsiq-karold would something like encloseInObject: true work or would you prefer it to be implicitly deduced? I.e. if the parent is the array, then enclose in []?

MykolaGolubyev avatar Dec 30 '18 00:12 MykolaGolubyev

I'm ok with encloseInObject.

tsiq-karold avatar Jan 02 '19 09:01 tsiq-karold