I have a json payload from which I am trying to extract a couple pieces of into. No matter what I try I cannot seem to get the jsonpath syntax right, although I have very similar json from which I am able to successfully extract date. However, the json below yields no results. I even tried it on the jsontest and while using the Flow libs I could get to the info without issue, but when using the Goessner libs I get nothing but errors. I am trying to get the hcfId and the userId from the second node in the list. I am sure that :
$[1][1].hcfId should return the value of 10043 but instead I get an error. I have verified that the json is well formed using the companion website. What am I doing wrong?
Lastly, which version of the jsonpath lib is being used by 2.2.1 snapshot?
thanks!
-gary
[
{
“hfaListSize”:2,
“pageNo”:1,
“recordPerPage”:30,
“totalPages”:0
},
[
{
“address”:"",
“city”:"",
“country”:"",
“daysRemaining”:"",
“eouReportId”:"",
“firstContactNumber”:"+01%555555%0",
“hasNonViewedEp”:"",
“hasUrgentEp”:"",
“hcfId”:“937003”,
“hcfName”:“DEMO HCF OUS”,
“ieouReportId”:"",
“lastDataReceived”:"",
“medicalRegistrationNo”:"",
“personId”:"",
“prescriber”:"",
“secondContactNumber”:"",
“status”:"",
“userEmailAddress":"dev@null.com”,
“userId”:“30054”,
“userLoginId":"demo@null.com”,
“userName”:“HCA, DEMO “,
“userType”:””
},
{
“address”:"",
“city”:"",
“country”:"",
“daysRemaining”:"",
“eouReportId”:"",
“firstContactNumber”:"+01%555555%0",
“hasNonViewedEp”:"",
“hasUrgentEp”:"",
“hcfId”:“100043”,
“hcfName”:“DEMO HCF US”,
“ieouReportId”:"",
“lastDataReceived”:"",
“medicalRegistrationNo”:"",
“personId”:"",
“prescriber”:"",
“secondContactNumber”:"",
“status”:"",
“userEmailAddress":"dev2@null.com”,
“userId”:“30055”,
“userLoginId":"dev3@null.com”,
“userName”:“HCA, DEMO “,
“userType”:””
}
]
]