I need the value out of an array, not the array brackets[ ]. Here is the JSON response I am trying to work with:
{
: "@rpc":"1.0",
: "@types":
: [
: : "com.model.chart.PieChart",
: : "com.model.chart.PieChartData"
: ],
: "@data":
: {
: : "@type":0,
: : "chartData":
: : [
: : : {
: : : : "@type":1,
: : : : "data":0.0,
: : : : "name":"Yes"
: : : },
: : : {
: : : : "@type":1,
: : : : "data":13.0,
: : : : "name":"No"
: : : }
: : ],
: : "subTitle":"Over Time Period",
: : "dataName":"MyData",
: : "title":"MyData Requirement"
: }
}
I am trying to get just the data for the yes and no. So for no, I just want to get 13.0 but I continue getting [13.0] with the array brackets. Here are the values of JSONPath Expressions I have tried:
[email protected]..[?(@.name=='No')].data
returns [13.0]
[email protected]..[?(@.name=='No')].data[0]
returns nothing
[email protected]..[?(@.name=='No')][0].data
returns nothing
[email protected][0]..[?(@.name=='No')].data
returns nothing
I am using version 2.3 of the JSON plugin in my jmeter v 3.0. Any help is greatly appreciated.