_fld:="refName":"refSub":"refStrength":"refWeakness"; json:=""; @For(n :=1; n<=@Elements(_fld); n:= n + 1; @If( @Elements( @GetField(_fld[n]) )>1; json := json + @Transform ( _fld[n]; "_fn" ; "\"" + _fn + "\":") + "[" + @Implode(@Transform( @GetField(_fld[n]) ; "_fn" ; "\"" + _fn + "\"" ) ; ",") + "]," ; json := json + @Transform ( _fld[n]; "_fn" ; "\"" + _fn + "\":\"" + @Text ( @GetField ( _fn) ) + "\"" + ",") ) ); "{ \"unid\":\"" +@Text(@DocumentUniqueID)+"\"," + @LeftBack(json;1) + + "}"