3

I want to use a custom field in my Views REST export, but rather than having "nothing": "My custom text", I would like "mycustomtext": "My custom text". Is there a way to do this from within the UI?

1 Answer 1

7

Serializer settings: force using field & json

Show: fields

Show settings: type an alias for each field

Above settings are shown in the images below

enter image description here

enter image description here

enter image description here

1
  • 2
    Despite “no code answer” requested, it’s also quite easy to provide your own Normalizer class if this doesn’t exactly suit. Commented Mar 10, 2018 at 23:44

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.