I need otp value from the following dynamic otp json element I am recieving in Web API Controller. I have tried a lot of things but couldn't find.
This is how I receive in controller
Quick watch window
I need otp value from the following dynamic otp json element I am recieving in Web API Controller. I have tried a lot of things but couldn't find.
This is how I receive in controller
Quick watch window
As your Quick Watch shows:
When you use dynamic
here, it won't be deserialized to an object with the properties in json, but will return a JsonElement
.
You can use its methods to parse the json as you like. Meanwhile you can just receive it like [FromBody] JsonElement opt
.