This commit fixes an issue that happens when running SCAN on a collection that has objects with fields, causing field values to be mismatched with their respective keys. This only occured with json output, and is a regression from #534. Fixes #569