Displaying variable in array in array = Impossible to access an attribute ("date") on a string variable ("") I'm trying to display a saved date from a json file.
I currently have:

{% set batchRowStats = craft.analytics.loadSavedBatch() %}

{% for stat in batchRowStats %}
    &lt;tr&gt;
        &lt;td&gt;{{ stat['senddate'].date }}&lt;/td&gt;
    &lt;/tr&gt;
{% endfor %}


And the information in the JSON file is:

[{"batchid":368,"total":1111,"opened":0,"clicked":0,"optout":0,"bounced":0,"subject":"subject line","senddate":{"date":"2017-06-02 06:00:22.000000","timezone_type":3,"timezone":"UTC"}}


I am getting this error:

Impossible to access an attribute ("date") on a string variable ("").

Which I am assuming it's because this information may be in a DateTime or object of sorts. I really need to just display "June 2, 2017" with a date_format but I'm not even sure how to get the string to display.
I attempted to get senate directly and output one element of it but no matter what index/key I set it would give me an error. Also, trying to change the object (or whatever it happened to be) in the PHP caused errors as well. I needed up just doing |first and |date to grab the date I needed and format it. The timezone_type and timezone were being converted into dates (December 1969 and current date) for some reason.

{% set batchRowStats = craft.analytics.loadSavedBatch() %}
{% for stat in batchRowStats %}
    {{ stat['senddate']|first|date("F j, Y") }}
{% endfor %}


I did change on thing in the PHP. I added (array) before the object inside of the array it's in. There are more complications to this scenario but I was assigning it to another variable and adding it to a different array. No matter what way I tried to extract the variable it would give me errors. String conversion gave me array error and array conversion usually gave me a string error and several others along the way. After placing (array) in front of it while assigning it to a variable it seemed to behave a bit better.

$emptyDateArray = (array) $innerResults['BatchStartDate'];