restore nesting of parent subjects in JSON