Q:

Iterate JSON data from a base64 encoded text using jq

I'd like to iterate through this JSON using jq, but I keep getting an error.  
The bash scripting with the jq query I am using is : 
for row in $(cat output.json | jq -r ' .outConfigs.faultInst[] | @base64'); do
     _ijq() {
      echo ${row} | base64 --decode | jq -r ${1}
      }
     echo $(_ijq '.@cause')
done

and the error is: 

jq: error (at :51): Cannot iterate over null (null) exit status
  5

What am I doing wrong with the jq query, please?  
{
  "configResolveClass": {
    "@guid": "ddsd2222e2/5d0cce7c-5296-4a2a-b6c3-05bewwewerwewe",
    "@response": "yes",
    "@classId": "faultInst",
    "outConfigs": {
      "faultInst": [
        {
          "@ack": "yes",
          "@cause": "power-problem",
          "@changeSet": "",
          "@code": "F0369",
          "@created": "2019-07-22T15:56:14.616",
          "@descr": "Power supply 1 in fabric interconnect A power: error",
          "@dn": "sys/switch-A/psu-1/fault-F0369",
          "@highestSeverity": "major",
          "@id": "109305",
          "@lastTransition": "2019-07-22T15:56:14.616",
          "@lc": "",
          "@occur": "1",
          "@origSeverity": "major",
          "@prevSeverity": "major",
          "@rule": "equipment-psu-power-supply-problem",
          "@severity": "major",
          "@tags": "network,server",
          "@type": "environmental"
        },
        {
          "@ack": "yes",
          "@cause": "equipment-inoperable",
          "@changeSet": "",
          "@code": "F0374",
          "@created": "2019-07-22T15:56:14.616",
          "@descr": "Power supply 1 in fabric interconnect A operability: inoperable",
          "@dn": "sys/switch-A/psu-1/fault-F0374",
          "@highestSeverity": "major",
          "@id": "109306",
          "@lastTransition": "2019-07-22T15:56:14.616",
          "@lc": "",
          "@occur": "1",
          "@origSeverity": "major",
          "@prevSeverity": "major",
          "@rule": "equipment-psu-inoperable",
          "@severity": "major",
          "@tags": "network,server",
          "@type": "equipment"
        }
      ]
    }
  }
}

A:

Are you just looking to extract the content of the @cause field in the JSON?  Why all the roundabouts involving b64 encode and decode back?  The immediate error with your attempt is not using the parent field .configResolveClass before the .outConfigs node. 
jq -r '.configResolveClass.outConfigs.faultInst[] | ."@cause"' json

Extending your attempts with the base64 encode/decode logic, do
ijq() {
    echo "$1" | base64 --decode | jq -r "${2}"
}

and your iterate script re-written as
while IFS= read -r b64; do
    ijq "$b64" '."@cause"'
done < <(jq -r '.configResolveClass.outConfigs.faultInst[]| @base64' json)

For a more robust handling of emitting JSON text with NULL delimit and reading back with a NULL delimit using -d '', you can do
while read -d '' -r b64; do
    ijq "$b64" '."@cause"'
done < <(jq -j '.configResolveClass.outConfigs.faultInst[]| @base64| (.  + "\u0000")' json)

