Flatten JSON response for session endpoint