Query and transform JSON data using JSONata expressions - like XPath/XQuery but for JSON.
Working with JSON can be a bit manual, using elvis and the safe navigation operator help for simple use cases, but as developer, life could be easier right?
Introducing JSONata
data = {
products: [
{ name: "apple", price: 1.50 },
{ name: "banana", price: 0.75 },
{ name: "cherry", price: 3.00 }
]
};
// Filter by condition
JSONata( "products[price > 1].name", data ) // ["apple", "cherry"]
// First match
JSONata( "products[price < 1]", data ) // { name: "banana", price: 0.75 }
It’s time to upgrade, all the fun new stuff will be using this approach.
There’s a great new PDF update coming which requires 7.1+, which is also another huge performance update for Lucee , 6.2 is a little old Vespa in comparison to 7.1!