Help with Jinja2

I have some json and want to filter out stuff older than the last hour… But I don’t know how to do it with the rejectattr; my code is below:

{% set tsFrom = as_timestamp(now()) - 3600 %}
{{ value_json.results|rejectattr('submissionDate', 'lt', tsFrom)|map(attribute='harvesterId')|unique|list|count }}

The submissionDate is formatted as: “submissionDate”:“2021-07-27T14:21:54.7079623Z”

If the json date is in string format, rejectattr / lt won’t work.
You’ll have to loop, converting the “submissionDate” via as_timestampor as_datetime