var list1 = [
					{ a: 1, b: 4, c: 1, d: 'z' },
					{ a: 0, b: 1, c: 2, e: 5 },
					{ a: 1, b: 3, c: 3, d: 'y' },
					{ a: 0, b: 2, c: 4, d: 'x' }
				];
			

Example 1: Range comprehension

return even numbers between 0 and 10

Code


						

Result


						

Example 2: Passing an array

return even numbers from the array of numbers

Code


						

Result


						

Example 3: Get the first result.

return the first from list1 where a = 1 and b = 3, ordered by b:

Code


						

Result


						

Example 4: Passing parameters

return numbers between 0 and 10 are divisible by the p1 parameter (3 in this case):

Code


						

Result


						

Example 5: Return selected properties, sorted

return properties { a, b } from list1, ordered by b:

Code


						

Result


						

Example 6: Return single property

return property c from items in list1 where a = 1, ordered by b:

Code


						

Result


						

Example 7: Selecting by function

return property b from list1:

Code


						

Result


						

Example 8: Filtering by function

return property b from list1:

Code


						

Result


						

Example 9: Specifying the interval of a range comprehension

return numbers between 0 and 6, incrementing by 2 (0, 2, 4, 6):

Code


						

Result