Skip to content

Instantly share code, notes, and snippets.

@bgriggs1
Created April 23, 2014 21:14
Show Gist options
  • Save bgriggs1/11232674 to your computer and use it in GitHub Desktop.
Save bgriggs1/11232674 to your computer and use it in GitHub Desktop.
// api
var api_url = 'http://api.knackhq.com/v1/objects/object_1/records';
// preparing filters
var filters = [
{
field: 'field_1',
operator: 'is',
value: 'test'
},
{
field: 'field_2',
operator: 'is not blank'
}
]
// add to URL
api_url += '?filters=' encodeURIComponent(JSON.stringify(filters));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment