Solved
Forum Discussion
PaulMS
8 years agoSuper Contributor
The result of JSONPath expression $..Telecoms[?(@.SystemCode=='phone')].ValueString has more than 25 elements because there are different use codes. Do you want to filter only mobile or home phone numbers?
$..Telecoms[?(@.SystemCode=='phone') && @.UseCode=='mobile')].ValueString
If the use code for the first element doesn't matter then
$..Telecoms[?(@.SystemCode=='phone')][0].ValueString
nkasemsan
8 years agoOccasional Contributor
That was my problem. I'm now getting the first phone number. I will eventually need to create a step to filter by phone type so this will be very helpful. Thank you!