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 10:09:44 UTC
[Bug 64134] New: JSON Evaluator with Split Function
https://bz.apache.org/bugzilla/show_bug.cgi?id=64134
Bug ID: 64134
Summary: JSON Evaluator with Split Function
Product: JMeter
Version: 5.1.1
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: HTTP
Assignee: issues@jmeter.apache.org
Reporter: kandasurya912@gmail.com
Target Milestone: JMETER_6.0.0
Hi Team,
[{
"temperature": 54.4461,
"temperatureArea": "12|23|890",
"area": "US",
"listeners": [],
"province": "california"
},
{
"temperature": 59.4461,
"temperatureArea": "12|23|80",
"area": "US",
"listeners": [],
"province": "ohaiio"
}
]
$[?(@.temperatureArea.length() >= 0)].merchGroupId
The problem is i want to extract the element temperatureArea which has only two
pipeline symbol init. But Its not working
Please take a look
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64134] JSON Evaluator with Split Function
Posted by bu...@apache.org.
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.