tried to figure out how to read json from js. Not finished yet