updated json api for surveys
fixed syntax to appease the cops