Created global renderJson function