"[[Ljava.lang.Object" in query result

Hi!

#set($getSoftwareListQry="select doc.title, version.value from XWikiDocument as doc, BaseObject as obj, StringProperty as version where doc.fullName = obj.name and obj.className = 'SoftwareInventory.Code.SoftwareInventoryClass' and obj.id=version.id.id and version.id.name='softVersion' and doc.fullName not like '%Template'")
$services.query.hql($getSoftwareListQry).execute()

When i run this HQL query in QueryTester macro, all ok, list of values returns, but when i place this code into page source, i see:

[[Ljava.lang.Object;@1368b94, [Ljava.lang.Object;@7e03672d, [Ljava.lang.Object;@116d4b39]

How to convert its to a sting?

Thanks.

You get an array in result. Each element matches what you ask.

$result[0] will be doc.title
$result[1] will be version.value

Actually you get a List<Object[]>.

See https://extensions.xwiki.org/xwiki/bin/view/Extension/Query%20Module#HFromJavacomponents for ex

Thanks! :slight_smile: )