How to create dependent veriable in Json Api Datasourec

I am using Json API plugin and data source to create boxplots graph using api json responce
my api responce is like [{“Industry”:“Apparel”,“Nationality”:“Myanmar”,“Worker_category”:“MoU Fresh”,“destination_country_post”:31.78,“destination_country_pre”:“268.9”,“destination_country_pre_and_post”:“300.68”,“origin_country_post”:“0”,“origin_country_pre”:“251.12”,“origin_country_pre_and_post”:“251.12”},{“Industry”:“Apparel”,“Nationality”:“Myanmar”,“Worker_category”:“Changed Non MoU to MoU”,“destination_country_post”:407.4,“destination_country_pre”:“9.63”,“destination_country_pre_and_post”:“417.03”,“origin_country_post”:“0”,“origin_country_pre”:“0”,“origin_country_pre_and_post”:“0”},{“Industry”:“Apparel”,“Nationality”:“Myanmar”,“Worker_category”:“MoU U-Turn”,“destination_country_post”:378.5,“destination_country_pre”:“13.1”,“destination_country_pre_and_post”:“391.6”,“origin_country_post”:“19.14”,“origin_country_pre”:“186.14”,“origin_country_pre_and_post”:“205.28”},{“Industry”:“Apparel”,“Nationality”:“Myanmar”,“Worker_category”:“MoU Fresh”,“destination_country_post”:11.56,“destination_country_pre”:“10.79”,“destination_country_pre_and_post”:“22.34”,“origin_country_post”:“221.07”,“origin_country_pre”:“0”,“origin_country_pre_and_post”:“221.07”}] I am create grafana veriable using this .I am create two veriable nationality and industry .
Now i want to filter the industry veriable based on nationality selcted in previous veriable .

i am trying using $[*][?(@.Nationality === ‘Vietnam’)].Industry but its not working.

I would use infinity plugin and do the following

parse-json
| where "Nationality" == '$nationality'

1 Like