Updated code to new JSON rendering way