Extracted method to render field value as JSON
Extracted loop body to method