ADD formatJson function in html