- Sun Mar 15, 2015 6:20 pm
#180462
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
https://github.com/sparkfun/phant/issues/98
Date range query string example (in UTC):
Trying to do somthing like the following.
Maybe the answer is you can't only support for URL encoding?
The following is from here
https://github.com/sparkfun/phant/issues/98
Date range query string example (in UTC):
Code: Select all
?gt[timestamp]=2014-08-15<[timestamp]=2014-08-20
Code: Select all
day(s), week(s), month(s) and year(s) are supported?gt[timestamp]=now -2 months<[timestamp]=now -1 month
Trying to do somthing like the following.
Code: Select all
var jsonData = $.ajax({
url: 'https://data.sparkfun.com/output/' + public_key + '.json',
// data: {page: 5},
// gt : now -2 hours',
// 'gt[timestamp]' : 'now -1 hour',
'lte' : ['timestamp', 'now - 2 hour'],
dataType: 'jsonp',
})