I want to log the values of a resultJsonFactory object in php with in Magento 2: How do I get the values I set in the $response object ?
$response = $this->resultJsonFactory->create();
$response->setHttpResponseCode(404);
$response->setData(['message' => 'bla bla bla']);
//something like that but it dosn't work
$myMessage = $response->getData('message');
UPDATE
I understand thant the getData is not set in the resultJsonFactory class but I can't find a way to get the values from the object.
What i am trying to get is the json string and the httpResponseCode.