Basically i need a way to define some sort of filter query from an API, that is consumed by another service.E.g. (filter out any objects that do not have someProperty > 5)filter = {"someProperty": {"$gt": 5}}or (filter out any objects that do not have cats === 'YES' and dogs === 'NO')filter = {"$and": [{"cats": "YES"}, {"dogs": "NO"}]}I know some big JS API Frameworks support query languages like this (e.g. Loopback), but it is typically specific to their framework. I was just wondering if there was some library that just does this? I saw json-filter, but it is really really basic and doesn't support things like and/or.
Submitted July 07, 2017 at 07:48AM by SonOfSpades
No comments:
Post a Comment