You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2020/02/11 17:37:29 UTC

[Bug 64134] JSON Evaluator with Split Function

https://bz.apache.org/bugzilla/show_bug.cgi?id=64134

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID
                 OS|                            |All

--- Comment #1 from Felix Schumacher <fe...@internetallee.de> ---
Thanks for the report, although I believe it would have been better placed on
the users mailing list. See https://jmeter.apache.org/mail2.html#JMeterUser

This question is about the usage of JSON Path and not so much about JMeter. You
seem to believe, that '|' is a native separator for arrays in JSON or JSON
Path. It is not. Therefore the 'length' function has no array to operate on and
will not work. There is no function that can split strings into arrays in JSON
Path (at least to my knowledge).

You can however use a regex to check for the presence of pipe signs in between
digits by using @.temperaturerea =~ /\d+\|\d+\|\d+/ instead of
@.temperature.length() >= 0.

The attribute 'merchGroupId' is not contained in the JSON snippet, so I believe
you have given us only part of your data. Feel free to replace it by any
attribute, that is available on your data.

-- 
You are receiving this mail because:
You are the assignee for the bug.