JQ map_values example
Transform every value of a JSON object with jq map_values(). Interactive example that reshapes each value while preserving the object keys.
The jq expression
map_values(f) applies f to each value of an object (or array) and returns a structure with the same keys. Unlike map, it preserves the object keys. Here we map over an object keyed by user id and reshape each value, keeping name and renaming age to ageYears.