Am i able to use a variable like the current time inside a jsonPath expression.
Say i call an api which returns a list of JSON elements
{classes: [ {"name":"maths", "start":'2017-02-15:17:00:00'}, {"name":"science", "start":'2017-02-15:18:00:00'} ]}
i want to find the classes that are after 2017-02-15:17:30:00
which i can write as
`
.check( jsonPath( "$..timeSlots.[?(@. start > 2017-02-15:17:30:00)] ).saveAs("class") )
`
but what if i wanted find the classes that are after now?
can i do something like?
`
.check( jsonPath( "$…timeSlots.[?(@. start > ${now})] ).saveAs(“class”) )
`
where “now” is a session variable… Or do i need to do this as predicate/filter out side the jsonPath
thanks