Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONata filter converts the result into single object instead of array when only one element present #5

Open
yesoreyeram opened this issue May 16, 2022 · 1 comment

Comments

@yesoreyeram
Copy link
Owner

Looks wonderful except when you use certain specific date ranges such 2012-12-14 00:00:00, the result set is as follows

{ "Name": "Zoro", "Place": "New York", "Longitude": 40.6943, "Latitude": -73.9249 }

no longer a table. interesting.

Originally posted by @yosiasz in grafana/grafana-infinity-datasource#315 (reply in thread)

@curvaton
Copy link

Hi, the only way I found to circumvent this bug was to add squared brackets to enclose the filter e.g:
from
| jsonata "*[Country in [${countries:singlequote}]]"
switch to
| jsonata "[*[Country in [${countries:singlequote}]]]"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants