adding json output with for visualization using mongodb and flask