And that's verbose because you're reconstructing the structure.
In fairness, it's impressive that the language can express it at all, given it's a query language.
Maybe the real answer is to denote a subset of JMESPath that is guaranteed to return assignable nodes, that is only selects, slices, filters, etc. Then you run the query and perform assignments against those.
For example, I wanted to write a simple expression to delete outputs from an ipython notebook.
The simplest expression I could come up with was: And that's verbose because you're reconstructing the structure.In fairness, it's impressive that the language can express it at all, given it's a query language.
Maybe the real answer is to denote a subset of JMESPath that is guaranteed to return assignable nodes, that is only selects, slices, filters, etc. Then you run the query and perform assignments against those.