Use parentheses around the string concatenation code:
echo '{"channel": "youtube", "profile_type": "video", "member_key": "hello"}' \
| jq '{channel: (.profile_type + "." + .channel)}'
Related Contents:
- Using jq to parse and display multiple fields in a json serially
- Select objects based on value of variable in object using jq
- Display curl output in readable JSON format in Unix shell script
- How to count items in JSON object using command line?
- How to get key names from JSON using jq
- Passing bash variable to jq
- How to install JQ on Mac on the command line?
- JQ: Select multiple conditions
- How to merge 2 JSON objects from 2 files using jq?
- How do I update a single value in a json document using jq?
- How to convert arbitrary simple JSON to CSV using jq?
- Using jq or alternative command line tools to compare JSON files
- how to parse a JSON String with jq (or other alternatives)?
- jq: print key and value for each entry in an object
- How to format a JSON string as a table using jq?
- Modify a key-value in a json using jq in-place
- How to sort a json file by keys and values of those keys in jq
- jq Conditional output
- Extract a specific field from JSON output using jq
- How do I use jq to convert number to string?
- How to check for presence of ‘key’ in jq before iterating over the values
- jq: Cannot index array with string
- Get outputs from jq on a single line
- get the first (or n’th) element in a jq json parsing
- Can I pass a string variable to jq not the file?
- Install jq JSON processor on Ubuntu 10.04
- How to filter array of objects by element property values using jq?
- Convert string to json in jq [duplicate]
- Iterating through JSON array in Shell script
- Edit package.json from command line
- jq – How to filter a json that does not contain
- jq not working on tag name with dashes and numbers
- Exclude column from jq json output
- jq select value from array
- Best way to format large JSON file? (~30 mb)
- passing arguments to jq filter
- How to convert a JSON object to key=value format in jq?
- jq – How do I print a parent value of an object when I am already deep into the object’s children?
- getting all the values of an array with jq
- jq dates and unix timestamps
- How to convert a string to an integer in a JSON file using jq?
- How to use jq when the variable has reserved characters?
- Check if string is a valid JSON with jq
- Converting CSV to JSON in bash
- How to extract a field from each object in an array with jq?
- Exporting JSON to environment variables
- How to map an object to arrays so it can be converted to csv?
- How to convert a json response into yaml in bash
- Printing multiple values on the same line
- Representing logic as data in JSON