Camel uses the json path library. Maybe you can ask them about your json payload and if what you attempt is possible. https://github.com/jayway/JsonPath
On Sun, May 1, 2016 at 7:42 PM, catshout <[email protected]> wrote: > 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. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
