How can I assign the value of a Json field that has a name starting with @
as the first character of its name to a user-defined-property in
EvaluateJsonPath?
For example, I have the following sample Json message:
{
"effectiveTimestamp": "2015-12-03T23:17:29.874Z",
"event": {
> "@class": "events.policy.PolicyCreated",
"id": "1e9b91398160471f8b6197ad974e2464",
"ipAddress": "10.8.30.145",
"policy": {
"additionalListedInsureds": [],
"address": {
"city": "Skokie",
"county": "Cook",
"id": "b863190a5bf846858eb372fb5f532fe7",
"latitude": 42.0101,
"longitude": -87.75354,
"state": "IL",
"street": "5014 Estes Ave",
"zip": "60077-3520"
},
"applicant": {
"age": 36,
"birthDate": "1979-01-12",
"clientId": "191",
"creditReport": {
"id": "ca5ec932d33d444b880c9a43a6eb7c50",
"reasons": [],
"referenceNumber": "15317191300474",
"status": "NoHit"
},
"firstName": "Kathy",
"gender": "Female",
"id": "1f4a3862fab54e058305e3c73cc13dd3",
"lastName": "Bockett",
"maritalStatus": "Single",
"middleName": "Sue",
"ssn": "*******"
},
"channelOfOrigin": "PublicWebsite",
... ...
Under EvaluateJsonPath, I can make
eventID = $.event.id
But I found out that if I make
eventClass = $.event.@class
the value of @class will never be assigned to eventClass.
How should we capture the value of such a Json field?
Thanks.
Hong
*Hong Li*
*Centric Consulting*
*In Balance*
(888) 781-7567 office
(614) 296-7644 mobile
www.centricconsulting.com | @Centric <https://twitter.com/centric>