How can I do a split on single quotes?
I was expecting some kind of escape but I've had no luck so far. Have a feeling this might not even be possible.
echo "{\"username\": \"hu'lk\"}" | jq -r '.username|split("\'")|join("")'
I expect to get {"username": "hulk"}
but I don't. It wants me to close pipe dquote>
instead.
I understand that there might be a better way to do it but the conditional replace is nested in a larger jq filter.