2.0.6 • Published 10 months ago

jsonata v2.0.6

Weekly downloads
323,927
License
MIT
Repository
github
Last release
10 months ago

JSONata

JSON query and transformation language

Reference implementation of the JSONata query and transformation language.

Installation

  • npm install jsonata

Quick start

In Node.js:

const jsonata = require('jsonata');

const data = {
    example: [
        {value: 4},
        {value: 7},
        {value: 13}
    ]
};

(async () => {
    const expression = jsonata('$sum(example.value)');
    const result = await expression.evaluate(data);  // returns 24
})()

In a browser:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>JSONata test</title>
    <script src="https://cdn.jsdelivr.net/npm/jsonata/jsonata.min.js"></script>
    <script>
      async function greeting() {
        var json = JSON.parse(document.getElementById('json').value);
        var result = await jsonata('"Hello, " & name').evaluate(json);
        document.getElementById('greeting').innerHTML = result;
      }
    </script>
  </head>
  <body>
    <textarea id="json">{ "name": "Wilbur" }</textarea>
    <button onclick="greeting()">Click me</button>
    <p id="greeting"></p>
  </body>
</html>

More information

Contributing

See the CONTRIBUTING.md for details of how to contribute to this repo.

bihua-nodered@productfy/commontransformation-flowluwfy-runtimesanity-plugin-schema-chodesckapilteztest2homebridge-blinds-up-down@nchannel/endpoint-sdk@nchannel/magento2-channel@nchannel/netsuite-channel@nchannel/shopify-channelinsurer-policyapioscar-ui-angularjasper-engineintegration-workbench-ui@netzoio/plugins@netzoio/widgets@telus-uds/system-themesvault-actionejz-sovapg-lambdafaros-canonical-reports@infinitebrahmanuniverse/nolb-jsona@samsquatch/components-starter@samsquatch/jobber-components@samsquatch/jsonata-visual-editor@samsquatch/mom-components-starter@samsquatch/traction-tools-componentsrenovate@everything-registry/sub-chunk-1987test-lib-apperx-redxmind2smmxtekos-flowstancyspinedvue-api-client@crixu/jsonata-code-completion@comyata/run@collabland/common@dendra-science/worker-tasks-agg@dendra-science/worker-tasks-dpe@bull-monitor/root@blocklet/pages-kit@blocklet/ai-runtime@rudderstack/workflow-enginedata-normalization-servicejfqjexijson-data-processorjsonata-clijsonata-extendedjsonata-functionsjsonata-serverjsonata-visual-editorjs-sql-from-jsonkafka-controllerjmdbjbjaresiobroker.weather-warningsjsonforms-react-spectrum-vite-testkumologica-serverless-plugin@saasquatchisntreal/traction-tools-componentsstubber-form-fields-pkgstubber-interpolation-pkgstated-jsstream-enginestring-and-object-toolstwitter2returnui5-task-ts-migrationtree-gatewaytopfe-util@apidaze/node-red-contrib-apidaze@amydin/bull-monitor-root@ataboo/bull-monitor-root@auphof/uql@aux4/adapter@awearsolutions/node-red@bedrock/vc-delivery@bifravst/e2e-bdd-test-runner@bifravst/muninn-proto@blendededge/ferryman-extensions@bn3t/mimus-serve@biothings-explorer/api-response-transform@biothings-explorer/json-transformer@clausehq/flows-engine@clausehq/flows-step-jsonata@ckatzorke/renovate@clausehq/flows-step-taskscreateurl@cloudaction/runtime@9paradox/apitester@coderbyheart/bdd-feature-runner-aws@axiosleo/node-red@belvedere/groupr@dataflow-designer/dataflow-graphql@confluentinc/schemaregistry@crft/jsonata-code-completionyiptunified-clits-goap
2.0.6

10 months ago

2.0.5

1 year ago

1.8.7

2 years ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.8.6

4 years ago

1.8.5

4 years ago

1.8.4

5 years ago

1.8.3

5 years ago

1.8.2

6 years ago

1.8.1

6 years ago

1.8.0

6 years ago

1.7.0

6 years ago

1.6.5

6 years ago

1.6.4

7 years ago

1.6.3

7 years ago

1.6.2

7 years ago

1.6.1

7 years ago

1.6.0

7 years ago

1.5.4

7 years ago

1.5.3

7 years ago

1.5.2

8 years ago

1.5.1

8 years ago

1.5.0

8 years ago

1.4.1

8 years ago

1.4.0

8 years ago

1.3.3

8 years ago

1.3.2

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.6

8 years ago

1.2.5

8 years ago

1.2.4

8 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago