SparkFun Forums 

Where electronics enthusiasts find answers.

Everything pertaining to the service, the phant project which powers it, and user projects which talk to the service.
By eephillip
How does one format the ajax JSONP object to do a filter on the timestamp.
Maybe the answer is you can't only support for URL encoding?

The following is from here
Date range query string example (in UTC):
Code: Select all
Code: Select all
?gt[timestamp]=now -2 months&lt[timestamp]=now -1 month
day(s), week(s), month(s) and year(s) are supported

Trying to do somthing like the following.
Code: Select all
var jsonData = $.ajax({
        url: '' + public_key + '.json',
        // data: {page: 5},
        // gt : now -2 hours',
        // 'gt[timestamp]' : 'now -1 hour',
        'lte' : ['timestamp', 'now - 2 hour'],     
        dataType: 'jsonp',