I’m in the process of designing a pipeline which will read all of the .pgp files from a sharepoint document library and then delete any over X amount of days.
To do this I am first using a Sharepoint Online - Search Items snap to search for all .pgp documents in the specified library.
However I can’t for the life of me get the filter working so that it leaves me with only files older than X days.
My Sharepoint snap returns the following and I want to filter on createdDateTime
So far I have attempted a filter snap using the following but that filters everything out.
Date.parse(jsonPath($, “$value[*].createdDateTime”)) < Date.now().minusDays(2)
I have noticed that if i amend this filter snap to the following it does work as i pass each individual array member (using the array position rather than the * above) but i need it to filter based on the entire array.
Date.parse(jsonPath($, “$value.createdDateTime”)) < Date.now().minusDays(2)
Any help would be greatly appreciated!