jolly-journalist-68574
08/21/2023, 8:02 PM1.0
it still saves it as intValue
instead of doubleValue
. If I set the value to be 1.01
it saves it as doubleValue
. Is there any way to set the number Value Type to be doubleValue
for a value of 1
or 1.0
?better-magician-65629
08/21/2023, 9:03 PMjolly-journalist-68574
08/21/2023, 10:20 PMbetter-magician-65629
08/21/2023, 10:22 PMjolly-journalist-68574
08/21/2023, 10:24 PM1.0
, but the SDK was returning the INT value of 1
happy-autumn-40938
08/21/2023, 10:26 PMbetter-magician-65629
08/21/2023, 10:26 PMjolly-journalist-68574
08/21/2023, 10:27 PMbetter-magician-65629
08/21/2023, 10:33 PMhappy-autumn-40938
08/21/2023, 10:36 PMbetter-magician-65629
08/21/2023, 10:37 PMjolly-journalist-68574
08/22/2023, 11:36 PMhappy-autumn-40938
08/22/2023, 11:47 PMbetter-magician-65629
08/23/2023, 12:01 AMconst value = growthbook.getFeatureValue('my_float_value', 0) // => 1
const displayValue = value.toFixed(2) // => '1.00'
GetFeatureValue<T>()
method is genericized. can you pass in your desired type, e.g. Double, and how does it behave? this signature looks similar to the java SDK, and in java we coerce the value to the desired number type. wondering if the C# SDK behaves similarly.JToken.ToObject<T>
and it should probably be coerced for you, similar to how i described the behaviour of the java SDK. https://www.newtonsoft.com/json/help/html/M_Newtonsoft_Json_Linq_JToken_ToObject__1.htm