jsonata-js/jsonata

default query on try.jsonata.org

VladimirAlexiev opened this issue · 1 comments

I'm completely new to jsonata.

The default invoice query on https://try.jsonata.org/ is

$sum(Account.Order.Product.(Price * Quantity))

I tried to do some filtering on Product Name and it came up empty. It took me all of 5 minutes to figure out how to spell a field-name that includes space. So please change the default query to this, which shows field-name with space and a string function:

$sum(Account.Order.Product[$contains(`Product Name`,"Hat")].(Price * Quantity))

Cheers for a nicely thought-out language! Much easier to understand than jq.

There is a mention in the documentation (https://docs.jsonata.org/simple#examples) which explains how to reference fields with whitespaces, so I'm not sure the default value needs to be changed.

Good to hear you're finding JSONata to be useful 🙂