mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
Improved set path example
This commit is contained in:
@@ -89,7 +89,7 @@ var pathOperatorScenarios = []expressionScenario{
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "Set path to extract prune deep paths",
|
||||
description: "Set path to prune deep paths",
|
||||
subdescription: "Like pick but recursive. This uses `ireduce` to deeply set the selected paths into an empty object,",
|
||||
document: documentToPrune,
|
||||
expression: "(.parentB.child2, .parentC.child1) as $i\n ireduce({}; setpath($i | path; $i))",
|
||||
|
||||
Reference in New Issue
Block a user