Second attempt at JSON format, this time with the aid of 'awk' variables