With recent version of ConfiDoc, 3.5.0, we have extensively expanded support for accessing the data from JSON right inside the ConfiDoc fields.
Below, please find couple of examples
Accessing values of a single element arrays
As you can see, all the values, for unknown reasons, are wrapped into arrays.
Before 3.5.0 version, ConfiDoc was able to output the values only in the format like this ["sash"] (when accessing it through result.lastModificationUser)
But now, the value is recognized as a single value array and teh text value get's nicely extracted from the JSON, producing the sash as a result
Accessing values from array of the arrays
To access the value 4.75 you will need to write the following expression into a ConfiDoc field name parameter
How to translate this? We ask ConfiDoc to get the row with index 1 (arrays indeces start with 0) and tell to pick the 3rd element (again, the index starts from 0, and theerfore the index value is 2 here, for element number 3)
To give another example - to access "Count" value you will need to write values
Accessing elements by attribute values
what if we want to show the value of a particular element from the array of attributes, for example
As you can see, the document contains an array of attributes, each with the same structure.
In ConfiDoc version 3.5.0 and later we now can put the following into a ConfiDoc Field name parameter to extract a value of a matching node:
So, it tells ConfiDoc to go through the attributes array, and match the objectTypeAttribute element with a key objectTypeAttributeId having a value 46, then get it's values via objectattributeValues and get the "value" element