fixed consolidate_json such that it is working on quora