I'm creating a custom display template, where I want to show the metadata field name and it's value.

The problem is that the Managed Properties use the internal name, and not the display name. How can I get the display name from the internal name?

For the code below: it's in a loop, so the i is the index of the loop.

var property = $getItemValue(ctx, String.format("Property {0}", i));
console.log(property.managedPropertyName) //This is the internal name.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.