grafana / grafana-infinity-datasource

CSV, JSON, GraphQL, XML and HTML datasource for grafana.
https://grafana.com/docs/plugins/yesoreyeram-infinity-datasource
Apache License 2.0
765 stars 103 forks source link

[Bug] Incorrect escaping in JSONata multi value filter for Strings containing single quotes #927

Closed sanbhattdeep closed 6 days ago

sanbhattdeep commented 4 months ago

Describe the bug

JSONata multi value filter does not work for Strings containing single quotes

Steps to reproduce

A multi value variable say Customer exists Sample values:- Burger Town,Brink's etc

My UQL query is parse-json | scope “data” | jsonata “*[name in [${Customer:singlequote}]]” … The UQL query works when Customer variable value = ‘Burger Town’ The UQL query does not work when Customer variable value = ‘Brink's’

The UQL being sent is:- parse-json | scope \"data\" | jsonata \"*[name in ['Brink\'s']]\" - Note the \ (double backlash) in front of the apostrophe

Screenshots

image

Screenshot 2024-07-13 at 3 07 18 PM

Version Details:

yesoreyeram commented 6 days ago

unfortunately escaping is not supported in UQL yet. suggest to open a feature request in UQL repository instead