У меня есть ответ JSON, и я хочу получить значение элемента и позиции динамически.
Hi I have JSON response and I want to get the Item and Position values. Where is it in the tree structure I want the Item and Position. In C# WPF "address": [ { "item": { "country": "USA", "locality": "Rio Rancho", "postal_code": "87124", "region": "New Mexico", "street": "1380 Rio Rancho Blvd SE #363", "type": [ "work" ] }, "position": "168,124,399,124,399,169,168,169" } ], "comment": [ { "item": "CELL", "position": "554,277,596,277,596,291,554,291" } ], "email": [ { "item": "aynejames@me.com", "position": "532,114,746,114,746,139,532,139" } ], "formatted_name": [ { "item": "Wayne Stansfield. CLCS", "position": "55,178,399,178,399,208,55,208" } ], "label": [ { "item": { "address": "1380 Rio Rancho Blvd SE #363 Rio Rancho, NM 87124, 87124", "type": [ "work" ] }, "position": "168,124,399,124,399,169,168,169" } ], "name": [ { "item": { "family_name": "CLCS", "given_name": "Wayne Stansfield." }, "position": "0,0,0,0,0,0,0,0" } ], "organization": [ { "item": { "name": "Luarris Insurance" }, "position": "54,300,400,300,400,351,54,351" }, { "item": { "name": "A Legacy Of Qu(zlity Service '" }, "position": "124,271,393,271,393,294,124,294" } ], If there are two Items like in Organization tab it should return both Item1,2 and Position1,2 . It is completely dynamic Address, Name, Email which are the starting Key values of the JSON response those also be may or may not there. And if there is any new key then the Item and Position value of that new key should also be returned. Can anyone help me out from this problem?
Что я уже пробовал:
Я пытался сделать его динамичным, но то, что я получаю, это только статический метод.
Пожалуйста, помогите мне решить эту проблему.