tamasfe / taplo

A TOML toolkit written in Rust
https://taplo.tamasfe.dev
MIT License
1.26k stars 108 forks source link

TOML Keyword Modification Feature in Taplo #579

Open TieWay59 opened 3 months ago

TieWay59 commented 3 months ago

I've been using Taplo and noticed there's no straightforward way to modify TOML keywords, similar to how we can with JSON using jq. Is there a feature for this in Taplo, or is it on the roadmap?

jq example:

cat info.json | 
  jq 'to_entries | 
       map(if .key == "honesty" 
          then . + {"value":"Orange"} 
          else . 
          end
         ) | 
      from_entries'