Extract data to struct