I am trying to compare two timestamps value inside the loop
Variable A - timestamp coming from http response inside the loop
$.loop.loopInput.hTTPRequest1.body[*].attributes[“msDS-XXXX”]
Variable B - date outside the loop defined by some variable.
You cannot not access from inside a loop the items outside, but loop input and context. If you are not using the context field now, assign the variable to it and refer to context instead of the variable that is outside.
If you are already using the context field for something else, you will have to move the define variable to inside the loop