handle jsonobjects from server