I am trying to achieve something like this, I have an OOB data and some user entered text I am able to parse the OOB data which is a JSON. But I am not able to check the pattern for user entered data Test data in the below example input. Is there any suggestion how can I do this?
u: (< \[ * input _* \] _*) ^keep() ^repeat()
$inputData=_0
$secondInput=%originalinput
getNameFromJson($inputData $secondInput)
$_tmp = ^jsonparse( $inputData )
\n name: $_tmp.user, phone: $_tmp.speed
if(^match(TEST)) {
^reuse(TEST)
} else if(match(THANKS)){
^reuse(THANKS)
}
u: TEST (test) ^keep() ^repeat()
Some test impl
u: THANKS (~thankConcept) ^keep() ^repeat()
Glad to be of help.
My input is like [ input {user:"test", speed:10} ] Test data