Skip to main content

image.pngThis is my JSON file.

I want to insert, in "structure_ids" array, the value 79538.

imageimageMaybe the problem is my value, I can't write it like that.

 

Thanks for your help

 

I believe the issue is that the JSON Path does not contain the target array name. Also, the Array Index should not contain the array name, but an integer index. Alternatively, you can set the update type to Append to avoid having to specify the index. For example:

 

image


Thank you so much, it works!

I just have an additional question. Do you know why, when I look at json text resulting from this transformation, the inserted value has double quotes.

image


Thank you so much, it works!

I just have an additional question. Do you know why, when I look at json text resulting from this transformation, the inserted value has double quotes.

image

Unless FME is completely certain, it has a tendency to default to string data types, which is why you get the double quotes.

You can cast (force) the values to int by using the following expression in the JSONUpdater:

image


ok thank you for this explanation

 


Reply