PDA

View Full Version : Why are remote filters formatted differently than sorters?



da_b0uncer
22 Apr 2013, 4:45 AM
When I look in a store request with remote filters it looks something like this:



filter[0][field]:price
filter[0][data][type]:numeric
filter[0][data][comparison]:lt
filter[0][data][value]:12
...
sort: [
{
"property":"company",
"direction":"ASC"
}
]

why isn't the filter formatted like the sorter?



filter: [
{
"field": "price",
"data": {
"type": "numeric",
"comparsion": "lt",
"value": 12
}
}
]
...
sort: [
{
"property":"company",
"direction":"ASC"
}
]

slemmon
23 Apr 2013, 9:32 PM
A filter may be simple, too, but can be more complex like the less-than operation in your filter example.