Generating a list of `s:LocationFeatureSpecification`s.
@@ -654,11 +654,12 @@ const realEstateFeaturesDetail = {
if (!value) {
return { "s:amenityFeature": undefined };
} else {
- return {
- "s:amenityFeature": {
+ const features = value.map(feature => ({
"@type": "s:LocationFeatureSpecification",
- "s:name": value,
- },
+ "s:name": feature,
+ }));
+ return {
+ "s:amenityFeature": features,
};
}
},
