json block to javascript block