Query for second last item

Query for second last item

@Andrew Sevil

Is it possible to construct a data query for the 2nd last item for a given variable?
device.getData({variable: 'blah', query: 'last_item'}) will get me the last item, but when triggering an analysis from a newly received data point, I just get the same item as the one coming through in the scope. I need the item before this one.

Help?