type Ward record {
string id;
Doctor[] doctors?;
};
type Doctor record {
string id;
};
type Hospital record {
string description;
Doctor[] doctors;
};
function transform(Ward ward) returns Hospital => {
doctors: from var doctorsItem in ward.doctors ?: []
select {
id: doctorsItem.id
}
};
Description: $title
https://github.com/wso2/ballerina-plugin-vscode/assets/26219651/045ad796-9c1c-407b-9a28-e8bb9017d38b
Steps to reproduce: Sample source:
Affected Versions: Plugin
v4.4.1
Ballerina2201.7.0