awk 'BEGIN {check=0;count=0;array[0]=0;arrayresp[0]=0;} {if(check==1 && $$1 != "" && match($$1, /^zz.[A-Za-z_]+/) && !match($$1, /.resp/)){array[count]=$$1;arrayresp[count]=$$1".resp";count=count+1;}if($$1=="Name"){check=1;}} END {printf("{\n\t\"data\":[\n");for(i=0;i<count;++i){printf("\t\t{\n\t\t\t\"{}\":\"%s\",\n\t\t\t\"{}\":\"%s\"}", array[i], arrayresp[i]); if(i+1<count){printf(",\n");}} printf("]}\n");}'