Webhook json Json with value that can be both string and numeric depending on IF

Hi

I am trying to build an app where I want to send a json with a webhook. I am trying to do this using bots in appsheet with a call a webhook task.

I have the problem that the “value” property in json should be able to be both string and numeric

I have in the table the following fields

valueType String or Numeric
valueString
value numeric

I do not have a value field but my idea was in the json to add a property with some kind of if formula that if valueType = String then value = valueString (as a string) and if valueType = Numeric then value = valueNumeric (as int).

I tried something similar to this but did not make it work.

How does this relate to AppSheet?

I mean i am trying to do it from appsheet .

I am using a bit and send webhook.