Forum Discussion

nkasemsan's avatar
nkasemsan
Occasional Contributor
7 years ago

Property transfer return empty array in JSON response

Hello,    I have a test step that returns a JSON response (sample response attached).  In a subsequent step, I do a property transfer in which a take the first element in the response and, in the T...
  • PaulMS's avatar
    7 years ago

    Would you believe that a property transfer only works with single quotes in the source JSONPath expression $..Telecoms[?(@.SystemCode=='phone')].ValueString

     

    JSONPath match assertions also work with single not double quotes. That seems like a defect.

     

    To get the first element where 'SystemCode = 'email' try

    $..Telecoms[?(@.SystemCode=='email')][0].ValueString