Write to OPC UDT tag arrays

Hi, I’m trying to write to an OPC UDT using derived tag and jsonGet/jsonGet functions.
I’ve setup mu OPC tag as Document type and the tag contains an array of elements like this:

[
{
“i_conformityResult”: 1
},
{
“i_conformityResult”: 0
}
]

Then I’ve setup a derived tag to read/write the first element with these read/write expressions:
Read jsonGet({source}[0],“i_conformityResult”)
Write jsonSet({source}[0],“i_conformityResult”,{value})
The data type is Int

As expected reading tag works fine as I get the first element value, but when I try to write some values I get this error message:

Error writing to Test.value: Bad(“Bad_TypeMismatch: The value supplied for the attribute is not of the same type as the attribute’s value.”)

I guess it’s an issue with UDT structure but I’m unable to sort it out.

Thanks for helping

Davide