fixed json output for multipal records.