code: def process_json_rec(self, data, name, idx, sub_idx):
          
          ret = []
          if isinstance(data, list):
              for kidx, rec in enumerate(data):
                  sub = self.process_json_rec(rec, name, idx, list(sub_idx + [kidx]))
                  ret.append(sub)
              return ret
  
          if isinstance(data, dict):
              for key in data:
                  rec = data[key]
                  sub = self.process_json_rec(rec, name, idx, list(sub_idx + [rec]))
                  ret.append(sub)
  
              if 'n' in data:
                  ret.append(self.process_js_mod(data['n'], name, idx, sub_idx))
              if 'mod' in data:
                  ret.append(self.process_js_mod(data['mod'], name, idx, sub_idx))
              if 'cert' in data:
                  ret.append(self.process_js_certs([data['cert']], name, idx, sub_idx))
              if 'certs' in data:
                  ret.append(self.process_js_certs(data['certs'], name, idx, sub_idx))
          return ret
docs: Processes json rec - json object
          :param data:
          :param name:
          :param idx:
          :param sub_idx:
          :return: