2

The output of a Element API endpoint allows you to change the resourceKey which contains the json data. Is it possible to return just the data without a resourceKey at all?

Values such as null, false and empty string just default to data.

kotyy
  • 101
  • 6

1 Answers1

0

Not cleanly... the Fractal library that the Element API plugin uses to serialize that data has 'data' hard-coded as the root element if no other resource key is passed in.

Brad Bell
  • 67,440
  • 6
  • 73
  • 143