Need to capture a specific one!
-
Hello guys, I want to capture a specific value from these 5 values, so what shall I do?
-
For example if you need the premium subscription, you can try this out :
PARSE "<SOURCE>" LR "itemname":"" """ Recursive=TRUE -> VAR "items"IF "<items>" Contains "premium_subscription"
SET VAR "Premium" "True"
ENDIF
-
@thelurker First part understood, but how to do the part of: IF "<items>" Contains "premium_subscription"
SET VAR "Premium" "True"
ENDIF
-
@test_it copy and paste in the loliscript
-
@thelurker And now?
-
@test_it capital N
-
You can use Regex, Just try to find a static structure for it
for example for capturing "premium_subscription" I notice that there a static name before it that never changes and is unique which is "purchase_Id" (not talking about its value)
So an appropriate regex for capturing the value "premium_subscription" would be:
"purchaseId":".*?","itemname":"(.*?)"