Partial working solution for json by Nasir