Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

adobe/json-formula

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

132 Commits
132 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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:

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

Specification / Reference: HTML / PDF

JavaScript API

Developer Instructions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.