I have the following Json-Structure converted to JObject:
{
"success": false,
"errors": {
"13": {
"errorCode": "address missing"
},
"4711": {
"year":1395
}
}
}
I want to retrieve the value of "errorCode". The problem is that the child under "errors" can be ANY number so I cannot simply use
jsonDetail.SelectToken("errors.13.errorCode")
to retrieve the value under "errorCode".
There always is only ONE child that contains "errorCode" but there can be additional children too (which I want to ignore)-
question from:
https://stackoverflow.com/questions/65886405/find-subelement-in-jobject-of-unknown-property-name 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…