Socket
Socket
Sign inDemoInstall

jsonata

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonata - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

package.json
{
"name": "jsonata",
"version": "2.0.0",
"version": "2.0.1",
"description": "JSON query and transformation language",

@@ -5,0 +5,0 @@ "module": "jsonata.js",

@@ -22,13 +22,16 @@ # JSONata

```javascript
var jsonata = require("jsonata");
const jsonata = require('jsonata');
var data = {
example: [
{value: 4},
{value: 7},
{value: 13}
]
const data = {
example: [
{value: 4},
{value: 7},
{value: 13}
]
};
var expression = jsonata("$sum(example.value)");
var result = expression.evaluate(data); // returns 24
(async () => {
const expression = jsonata('$sum(example.value)');
const result = await expression.evaluate(data); // returns 24
})()
```

@@ -46,5 +49,5 @@

<script>
function greeting() {
async function greeting() {
var json = JSON.parse(document.getElementById('json').value);
var result = jsonata('"Hello, " & name').evaluate(json);
var result = await jsonata('"Hello, " & name').evaluate(json);
document.getElementById('greeting').innerHTML = result;

@@ -51,0 +54,0 @@ }

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc