understood how to read the json passed from js