ドキュメントから部分配列を取得するにはどうすればよいですか?
ドキュメントの 1 つを次に示します。
"director_details": {
"0": {
"AppointmentDate": "2010-06-02",
"AppointmentStatus": "CURRENT",
"AppointmentType": "SEC",
"NumAppointments": "1",
"Person": {
"CountryOfResidence": [],
"DOB": [],
"Forename": "MARK JHONSONE",
"Nationality": "NATIONALITY UNKNOWN",
"PersonAddress": {
"AddressLine": "5 PARSONS STREET",
"Country": [],
"County": "WEST MIDLANDS",
"PostTown": "DUDLEY",
"Postcode": "DY1 1JJ"
},
"PersonID": "CSeJxNkEELgkAQhe/9CvFerlpZsK0IFUSEUFZH2dyxlnK1XY3897mG5WV48/HezDDYf2cP4wVS8VwsTHuETANEkjMurgvzGK2HM9PwyQDfoW4qLQpV0rJSBGHr32he1gUQu6WtxIzLNJcgaAZkF+y3 [...]",
"Surname": "WESTWOOD",
"Title": "MR"
}
},
"1": {
"AppointmentDate": "2010-06-02",
"AppointmentStatus": "CURRENT",
"AppointmentType": "DIR",
"NumAppointments": "1",
"Occupation": "DIRECTOR",
"Person": {
"CountryOfResidence": "UNITED KINGDOM",
"DOB": "1979-11-30",
"Forename": "MARK DAVID",
"Nationality": "BRITISH",
"PersonAddress": {
"AddressLine": "5 PARSONS STREET",
"Country": [],
"County": "WEST MIDLANDS",
"PostTown": "DUDLEY",
"Postcode": "DY1 1JJ"
},
"PersonID": "CSeJxNkN0KgkAQhe97CvG+XCt/gm0jqCAihLK6lE3HWsp129XIt881TG+GMx9nZg6DF5/sabxBKpbzuWmPkGkAj/OE8dvcPIWboW8aCzLAD6jqSoVQBS1KRRC2ukbzohJAxg1tJE6YTHMJnGZA9svD [...]",
"Surname": "WESTWOOD",
"Title": "MR"
}
}
}
名に「デビッド」が含まれ、姓と役職が空でない監督を検索したいです。
非常にうまく機能するクエリがありますが、出力から削除したい余分なサブ配列も返します。