cancel
Showing results for 
Search instead for 
Did you mean: 

JSON Generator with 'Or' operator

UrsVinny
New Contributor II

Hi All
I am reading an excel file which is having multiple worksheets in it. I need to check whether the worksheet name is matching with the Sheet name specified in JSON generator snap or not. Customer has recently came back and said that one of the worksheet name can be with ‘|’ suffixed and Prefixed with its name and again in some of the source file the worksheet name will be without ‘|’.
|Dashboard|
Dashboard
As of now in the JSON editor snap I am using the below code.
image

Is it possible to include ‘OR’ in the same JSON code? And if not then how can we process if the worksheet name is with and without ‘|’ operator.

Cheers
Vinny

2 REPLIES 2

bojanvelevski
Valued Contributor

Hi @UrsVinny,

If my understanding is correct, you’re using the JSON shown on the picture as a configuration file?
What are the sequential steps, are you joining this with the data to check if the Sheet name is in the list?
If that’s so, why not just add one more name to it (“Dashboard”).

UrsVinny
New Contributor II

I was able to resolve the problem. By adding an utility pipeline to get the Dashboardsheet name and based on that invoke the relevant Pipeline.