Please ignore.. i looked at the code again and there was typo.. the "$" was
missing from the one of the attributes..
thanks for looking into it

On Tue, Jun 28, 2016 at 2:41 PM, Anuj Handa <[email protected]> wrote:

> Hi Matt,
>
> here's a snipet of the JSON,0 is a valid value
>
> "SubwayPOSTransaction": {
> "OrderSale": {
> "Version": "9.0",
> "ApplicationVersion": "8.2.92.28786",
> "MessageId": "sf354-4c31-941e-9f9717f8ab90",
> "TransactionId": "6779",
> "StoreNumber": "123456",
> "SatelliteNumber": "0",
> "TerminalNumber": "1",
>
> On Fri, Jun 24, 2016 at 4:23 PM, Matt Burgess <[email protected]> wrote:
>
>> Anuj,
>>
>> It seems like the value at that path is an array, perhaps add [0] to your
>> JSON Path. Is "0" the expected value of that field? If not then perhaps the
>> JSON path itself is incorrect, you could test it with some sample data at
>> http://jsonpath.com/
>>
>> Regards,
>> Matt
>>
>>
>> On Fri, Jun 24, 2016 at 3:34 PM, Anuj Handa <[email protected]> wrote:
>>
>>> Hi ,
>>>
>>> I am trying to user the Evaluate Json path processor.
>>> It works fine except when the Value is evaluated to 0, then it throws
>>>  an error
>>>
>>>
>>> 2016-06-24 15:00:56,917 ERROR [Timer-Driven Process Thread-9]
>>> o.a.n.p.standard.EvaluateJsonPath
>>> EvaluateJsonPath[id=475d43ec-549b-4378-81d5-778041558781] Unable to return
>>> a scalar value for the expression
>>> $..['SubwayPOSTransaction']['OrderSale']['SatelliteNumber'] for FlowFile
>>> 1519640. Evaluated value was [0]. Transferring to failure.
>>>
>>> when i change the ReturnType to Json then it works but it makes the
>>> value [0]
>>>
>>> Any thoughts if its an issue or configuration of the proessor that is
>>> incorrect ?
>>>
>>> [image: Inline image 1]
>>>
>>
>>
>

Reply via email to