gojq icon indicating copy to clipboard operation
gojq copied to clipboard

Update iter.Next() values

Open LeonB opened this issue 7 months ago • 1 comments

Would it be possible to do something like:

for {
	v, ok := iter.Next()
	if !ok {
		break
	}

	v = "TEST"
}

And update all values for a .[] query for example?

LeonB avatar May 21 '25 12:05 LeonB

Append | .[] = "TEST" to the query string?

itchyny avatar May 21 '25 13:05 itchyny

In my use case v = "TEST" would be the output of some external system.

LeonB avatar Jun 30 '25 14:06 LeonB

I can't understand what you want to achieve.

itchyny avatar Jun 30 '25 14:06 itchyny