Skip to content

Description of "Set path to prune deep paths" example is wrong #2320

@GrahamHannington

Description

@GrahamHannington

The yq docs heading "Set path to prune deep paths" states:

This uses ireduce to deeply set the selected paths into an empty object.

However, the example that follows that statement does the "opposite"; it keeps only the selected paths.

The combination of input, expression, and output are correct. It's just the preceding statement that's wrong.

Suggested rewording (I acknowledge this is not be ideal; it's just a suggested starting point for further wordsmithing; I use "deeply prune" only to echo the heading):

This uses ireduce to deeply prune the input, leaving only the selected paths.

yq v4.44.6 on Windows 10 installed via binary release

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions