From 82e9f5ed5bacfcfb0c438814163299bdf254579e Mon Sep 17 00:00:00 2001 From: sharpshark28 Date: Thu, 17 Aug 2017 18:21:06 -0500 Subject: [PATCH] Filter docs --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index d7400c9..e628b29 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,20 @@ Currently supports booleans and strings. (See [#1](https://github.com/sharpshark .search('name', 'steele') ``` +#### Filter + +Simpler version of search using a custom function in the chain. + +```javascript +.filter(a => a.age >= 21) +``` + +##### By Key + +```javascript +.filterBy('age', x => x >= 21) +``` + #### Sort Currently supports booleans and strings. (See [#1](https://github.com/sharpshark28/json-query-chain/issues/2) for Integer Support)