frank.leverenz Posted February 17, 2022 Share Posted February 17, 2022 Hi,How to access JSON data outside the data array?I have a simple JSON File and the JSON Data Adapter with jsonql{ "inventory": { "inventur": "Test_2_INT_2021-08-02", "supplier": "114609", "date": "Aug 19, 2021" }, "assets": [ { "asset": "OA_S10005204", "partnumber": "7341719-2", "inventnr": "10056137" }, { "asset": "OA_S10005208", "partnumber": "7338320-3", "inventnr": "10056126" } ]}[/code]The jsonql query is "assets" and in the "Details"-area I can access all assets data: see attached screenshotIn the "Title"-area I need the $.inventory.inventur field but can't get it runI tried <field name="inventory.inventur" class="java.lang.Integer"> <property name="net.sf.jasperreports.jsonql.field.expression" value="inventory.inventur"/> <fieldDescription><![CDATA[$.inventory.inventur]]></fieldDescription> </field>[/code]but the result is "null": see attached ScreenshotI also tried <queryString language="jsonql"> <![CDATA[]]> </queryString>[/code]but in this case the "assets" data array ist missingAny idea?ThanxFrank Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now