JSON hack to pass data from servre to client