jmespath.js icon indicating copy to clipboard operation
jmespath.js copied to clipboard

Date comparaison fails when the field is a Date Object

Open jlamande opened this issue 7 years ago • 1 comments

(more details will be soon provided)

jlamande avatar Dec 03 '18 08:12 jlamande

Just discovered this myself when trying to filter the results of S3.listObjectsV2 by the LastModified date within the Contents

A quick hack like this works... not the best solution...

    data.Contents.forEach((item) => {
        if (item.LastModified) {
            item.LastModifiedString = item.LastModified.toISOString();
        }
    })

Now I can do a >= comparison against Contents[?LastModifiedString]

nschirmer avatar Jul 11 '19 21:07 nschirmer