Dear community,

I've follwing input in my message body:

{
                "APPLICATION": "Filiale",
                "ADAPTER": "SAPEIB",
                "QUEUE": "SIB.data.out.queue",
                "PROJECT_ID": "225",
                "PROJECT_NAME": "RETFIL010",
                "COMMUNICATION": [{
                        "VALUE": "C:\\cfs\\host\\inbound",
                        "NAME": "FILE_DIR"
                },
                {
                        "VALUE": "WBBDLD_#DOCNUM#_#RCVPRN#.xml",
                        "NAME": "FILE_NAME"
                },
                {
                        "VALUE": "file",
                        "NAME": "MESSAGE_TYPE"
                },
                {
                        "VALUE": "Stammdaten, Sortimentsliste",
                        "NAME": "PROCESS_NAME"
                }]
}

2 statements in my route look like:

<setHeader headerName="fileName">
        <jsonpath>$.COMMUNICATION.[?(@.NAME=='FILE_NAME')].VALUE</jsonpath>
</setHeader>

<setHeader headerName="queue">
        <jsonpath>$.QUEUE</jsonpath>
</setHeader>

both have different outputs

in.header.fileName: ["WBBDLD_#DOCNUM#_#RCVPRN#.xml"]
in.header.queue: SIB.data.out.queue

Why does the first query produce [" "] around? Any ideas to get this rid?

Best
- Gerald



--
View this message in context: 
http://camel.465427.n5.nabble.com/jsonpath-behaviour-on-arrays-misleading-tp5782038.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to