lw-odata-json-parser
v0.1.10
Published
This takes an odata query and parses it into a usable json object
Downloads
18
Readme
Read this first
Examples of parsing:
$filter=Name eq 'Milk' [ { "query": "$filter", "item": { "name": "eq", "left": "Name", "right": "Milk" } } ]
$filter=(4 add 5) mod (4 sub 1) eq 0 [ { "query": "$filter", "item": { "name": "eq", "left": { "name": "mod", "left": { "name": "add", "left": "4", "right": "5" }, "right": { "name": "sub", "left": "4", "right": "1" } }, "right": "0" } } ]
$expand=Products($orderby=ReleaseDate asc, Rating desc) [ { "query": "$expand", "item": { "name": "Products", "params": [ { "query": "$orderby", "list": [ { "name": "ReleaseDate", "type": "asc" }, { "name": "Rating", "type": "desc" } ] } ] } } ]