get_yaml_field function

Extract field from yaml text