Hello
There is a JSON that looks like this:
{ "response": { "count": 10, "items": [{...}, {...}, {...}, {...}] } } Each element of the items array either contains or does not contain the copy_history array . In general, the items array looks like this:
"items": [{ "id": 111, "from_id": -119473366, "owner_id": -119473366, "date": 1483779506, "marked_as_ads": 0, "post_type": "post", "text": "", "copy_history": [{ "id": 30679, "owner_id": -96126130, "from_id": -96126130, "date": 1483772560, "post_type": "post", "text": "", "attachments": [{ "type": "photo", "photo": { "id": 456240780, "album_id": -7, "owner_id": -96126130, "user_id": 100, "photo_75": "https://pp.vk.me/...a3e/0zDlnwXV97M.jpg", "photo_130": "https://pp.vk.me/...a3f/is7lDvyh3JE.jpg", "photo_604": "https://pp.vk.me/...a40/Z6vXcOY-cf4.jpg", "photo_807": "https://pp.vk.me/...a41/g9QedfvZoZg.jpg", "width": 640, "height": 521, "text": "", "date": 1483140936, "post_id": 29964, "access_key": "" } }] You need to go through each of the items, get the value of the id field from it, and find out if there is an copy_history array.
help me please. thanks in advance