1

I have a result set similar to this (using Views RESTful Export):

views exported as JSON

My question, how to change created_1 key and name it something else?

3
  • 1
    From views? Have you implemented your own Normalizer class? – Kevin May 21 at 23:43
  • Yes, but seems that the Normalizer class alters the Entity display format not Fields. Can Normalizer be used to alter field output? – W.M. May 22 at 8:47
  • 1
    I've only ever used Entity on a view with normalizer. The other upside is if you serialize an entity from code elsewhere, it will be formatted the same way through the normalizer. – Kevin May 22 at 11:14
1
+50

From views you can configure the custom name/alias for fields from Fields | Settings option under Format. Check the screenshot for reference enter image description here

1
  • 1
    Could not be simpler than that, thank you. – W.M. May 22 at 19:30

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.