We are building a React application for a client, where we are using Craft as the API/Backend. I am building the API as a custom Craft plugin, which will return specific JSON data to React, dependent upon the action route it requests.
I was wondering if there was a way that anyone has managed to prevent the default Entry properties from being included in the response, as it just adds a lot of unnecessary clutter. I have included a visual example at the bottom of this question to further clarify what I mean.
I did try to research if this was answered already, and found this link Ignore fields in search index I did see it was back in 2016, so was hoping something has changed.
Example:
$criteria = craft()->elements->getCriteria(ElementType::Entry);
$criteria->section = "journeys";
$journeys = $criteria->find();
$responseObj = new \stdClass;
$responseObj->journeyOne = $journeys[0];
$this->returnJson($responseObj);
I literally won't be using any of these, as I only require the data from my custom fields(which haven't been created yet).