Working on D8, I am able to get the JSON export. Now I need to format the data. I tried some external PHP script it's working great. But how can I do it in a a view itself and how can I overwrite the JSON.

Views exports it like thi:

[{"name":"john"},{"name":"mathew"}]

But I need a format like this:

{"data":[ "john", "mathew"]}
  • You need to implement your own Normalizer if you want to change the result object from a Views Rest Export. – Kevin Nov 28 at 16:19

Your Answer

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.

Browse other questions tagged or ask your own question.