Skip to main content
expand "IDK" for clarity
Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 265

IDK whatThis may not be the best way to do it is, but this oneit works:

.a.b |= map(if .name == "name1" then .param.new = "QQQ" else . end)

IDK what the best way to do it is but this one works:

.a.b |= map(if .name == "name1" then .param.new = "QQQ" else . end)

This may not be the best way, but it works:

.a.b |= map(if .name == "name1" then .param.new = "QQQ" else . end)
added 4 characters in body
Source Link
Fravadona
  • 1.6k
  • 5
  • 14

IDK what the best way to do it is but this one works:

.a.b |= map(if .name == "name1" then (.param.new = "QQQ") else . end)

IDK what the best way to do it is but this one works:

.a.b |= map(if .name == "name1" then (.new = "QQQ") else . end)

IDK what the best way to do it is but this one works:

.a.b |= map(if .name == "name1" then .param.new = "QQQ" else . end)
added 4 characters in body
Source Link
Fravadona
  • 1.6k
  • 5
  • 14

IDK what the best way to do it is but you can dothis one works:

.a.b |= map(if .name == "name1" then (.new = "QQQ") else . end)

IDK what the best way to do it is but you can do:

.a.b |= map(if .name == "name1" then (.new = "QQQ") else . end)

IDK what the best way to do it is but this one works:

.a.b |= map(if .name == "name1" then (.new = "QQQ") else . end)
Source Link
Fravadona
  • 1.6k
  • 5
  • 14
Loading