- Subscribe to RSS Feed
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content
How do I parse a JSON response for validation or to extract a value?
|
You will need to write a Script that plays after your message and extracts the value. |
|
Step 1Insert a Script following the Message whose response you wish to validate or extract a value from. |
|
Step 2Ensure that the Script doesn't play until the Message has completed. If you are using a Sequenced Test Clip, this will always be the case and there is nothing special to do. If you are using a Timed Test Clip, then you must either put the Message and the Script together into a Chain or put a Checkpoint between the Message and the Script. You could also insert a Delay between the Message and Script that you know will always be long enough, but this may not be consistently reliable if the response times to your Message vary. Note that your Script could also put the extracted value into a property, insert it into another message, or do anything with that value that a Script can do. |
|
Step 3Your script should be something like the following:
|
|
|
Here is an example of the Script following the Message in a Chain: |
![]() |

