1.1.1 • Published 25 days ago
@adobe/json-formula v1.1.1
json-formula: A Query Language for JSON with Spreadsheet Functions
This project hosts an implementation of an expression grammar that operates on JSON documents. The grammar is a mashup of:
- JMESPath query language.
- Operators and functions from OpenFormula
Given:
{
"items": [
{
"desc": "pens",
"quantity": 2,
"price": 3.23
},
{
"desc": "pencils",
"quantity": 4,
"price": 1.34
}
]
}
sum(items[*].price * items[*].quantity)
=> 11.82
items[*].{price: price, quantity: quantity, subtotal: price * quantity}
=>
[
{
"price": 3.23,
"quantity": 2,
"subtotal": 6.46
},
{
"price": 1.34,
"quantity": 4,
"subtotal": 5.36
}
]
Try it
Visit the Playground
Documentation
1.1.1
25 days ago
1.1.0
28 days ago
1.0.1
5 months ago
1.0.0
5 months ago
0.2.4
6 months ago
0.2.3
6 months ago
0.2.2
6 months ago
0.2.0
8 months ago
0.1.53
11 months ago
0.1.52
1 year ago
0.1.51
1 year ago
0.1.50
1 year ago
0.1.45
2 years ago
0.1.46
2 years ago
0.1.47
1 year ago
0.1.48
1 year ago
0.1.49
1 year ago
0.1.44
2 years ago