we are having trouble with getting a message out of a JSON message. We are rather confused by how the response is formatted since the key we receive for the list is empty but that isn't anything we can change. This is a response from a backend API that sends error messages when something goes wrong.
This is the JSON string. What we want to extract to a simple string is "Passwords must be at least 6 characters."
{
"message": "The request is invalid.",
"modelState": {
"": [
"Passwords must be at least 6 characters."
]
}
}
What we have tried are a few things found over here and here but without any success.
Right now we are completely lost on how to get that one string out of that JSON message so literally any help is appreciated.
Regards, CptSeasick