#!/usr/bin/env jq -rf
#
# catj - implementation of catj in jq
# dependencies: jq
#
# ---
# see: https://news.ycombinator.com/item?id=20245913

tostream
| select(length > 1)
| (
  .[0] | map(
    if type == "number"
    then "[" + tostring + "]"
    else "." + .
    end
  ) | join("")
) + " = " + (.[1] | @json)
