Is it possible to use output of one query as a input to another query

I am working with mixed data source where Query A is using Loki and Query B is Infinity.

In Query A(Loki) - I’m parsing json to get specific key’s value. Please refer to below image

image

In Query B (Infinity) - I want to use “sdline” value as a source for Inline/Reference (Infinity source types) . Is their any way to use it?

Apart from above question, I want to know below case where - The field sdline contains array of json objects which further I want to parse it one by one or any single object using array index. Here, I want to pass index of the array dynamically (not from variable). Is it possible using Loki datasource or any other?

I’m not sure if it is the correct way to use multiple data sources for Array. Please help me with suggestions.