I have a REST EXPORT view getting fields values of a node. I want to override the labels of these fields in the response returned. For example:- the returned response like this

[ 
    { 
        "question_title": "How are you?", 
}
]

I want the response like this

[ 
    { 
        "questionTitle": "How are you?", 
}
]

I tried to create label from the view but it doesn't affect.

In your view's row style options you can rename any exposed field's label. The form labels those fields as alias.

This is screenshot from another view I was working on, but should give you an idea.

screenshot of views row style options

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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