unytics/bigfunctions

[new]: `json_query(json_string, query)`

unytics opened this issue · 1 comments

Check the idea has not already been suggested

Edit the title above with self-explanatory function name and argument names

  • The function name and the argument names I entered in the title above seems self explanatory to me.

BigFunction Description as it would appear in the documentation

wrap https://github.com/jmespath/jmespath.js

Examples of (arguments, expected output) as they would appear in the documentation

  1. json_query('{"foo": [{"first": "a", "last": "b"}, {"first": "c", "last": "d"}]}', "foo[*].first")
    --> [ 'a', 'c' ]

json_query(
    '{"foo": [{"age": 20}, {"age": 25}, {"age": 30}, {"age": 35}, {"age": 40}]}',
    "foo[?age > `30`]"
)

--> [ { age: 35 }, { age: 40 } ]

Congrats @sidaliSadi !