$yaml = Yaml::parse('/path/to/file.yaml');
$data = array_map(function ($field) {
$item = [];
if (isset($field['label'])) {
$item['label'] = $field['label'];
}
if (isset($field['type'])) {
$item['type'] = $field['type'];
}
return $item;
}, $yaml['profileData']['Fields']);