Json – jq: assigning to computed property of an object
I'm trying to get jq to generate an object whose keys are computed. This didn't work: $ jq -n --arg key foo '{} as $o | $o[$key] = 42' jq: error (at <unknown>): Invalid path expression near attempt to access…