I'm making a PHP page that can display the BackupJobs of the last week.
I get all of the backup-jobs from an API that puts it into a JSON format.
I'm stuck on the point where I have a BackupSetID and want to echo all BackupJobs that matches with the BackupSetID onto a page.
Array:
{
"Status": "OK",
"Data": [
{
"BackupJob": [
"2019-07-30-16-00-00",
"2019-07-30-17-00-00",
"2019-07-30-18-00-00",
"2019-07-30-21-00-00",
"2019-07-30-23-00-00",
"2019-07-31-08-00-00",
"2019-07-31-09-00-00",
"2019-07-31-10-00-00",
"2019-07-31-11-00-00",
"2019-07-31-12-00-00",
"2019-07-31-13-00-00",
"2019-07-31-14-00-00",
"2019-07-31-15-00-00",
"2019-07-31-16-00-00",
"2019-07-31-17-00-00",
"2019-07-31-18-00-00",
"2019-07-31-21-00-00",
"2019-07-31-23-00-00",
"2019-08-01-08-00-00",
"2019-08-01-09-00-00"
],
"BackupSetID": "1369227132163",
"Removed": false
},
{
"BackupJob": [
"2019-07-22-18-00-00",
"2019-07-22-22-00-00",
"2019-07-23-10-00-00",
"2019-07-23-14-00-00",
"2019-07-23-18-00-00",
"2019-07-23-22-00-00",
"2019-07-24-10-00-00",
"2019-07-24-14-00-00",
"2019-07-24-18-00-00",
"2019-07-24-22-00-00",
"2019-07-25-10-00-00",
"2019-07-25-14-00-00",
"2019-07-25-18-00-00",
"2019-07-25-22-00-00",
"2019-07-26-10-00-00",
"2019-07-26-14-00-00",
"2019-07-26-18-00-00",
"2019-07-26-22-00-00",
"2019-07-27-10-00-00",
"2019-07-27-14-00-00",
"2019-07-27-18-00-00",
"2019-07-27-22-00-00",
"2019-07-28-10-00-00",
"2019-07-28-14-00-00",
"2019-07-28-18-00-00",
"2019-07-28-22-00-00",
"2019-07-29-10-00-00",
"2019-07-29-14-00-00",
"2019-07-29-18-00-00",
"2019-07-29-22-00-00",
"2019-07-30-10-00-00",
"2019-07-30-14-00-00",
"2019-07-30-18-00-00",
"2019-07-30-22-00-00",
"2019-07-31-10-00-00",
"2019-07-31-14-00-00",
"2019-07-31-18-00-00",
"2019-07-31-22-00-00"
],
"BackupSetID": "1369227067996",
"Removed": false
}
]
}
How would I display only the BackupJobs of the last week with (for example): BackupSetID = 1369227067996?
I tried to search between values. But without a result.
BackupSetID? In other words, can there be multipleBackupSetIDto match with?"Removed": false? Does it have any significance?foreachloop? what is your desire output?