title: Filter an array using value from another array
body: <p>I need to filter <code>Schedules[ ]</code> Array using <code>Dates[ ] Array</code> where <code>"date_id" == "schedule_date_id"</code>.</p>
  
  <p>I need only those elements where <code>date_id</code> matches <code>schedule_date_id</code> and then reload the table. I need to show Schedules according to dates.</p>
  
  <p>What is the Swift code for this?</p>
  
  <p>Below is the JSON I have:</p>
  
  <pre><code>{
  dates =     (
              {
          "date_date" = "2017-11-04";
          "date_id" = 4;
          "date_image" = "https://project-isdental-cammy92.c9users.io/api/images/schedule-days/day_1.png";
          "date_title" = "Day 1";
      },
              {
          "date_date" = "2017-11-05";
          "date_id" = 5;
          "date_image" = "https://project-isdental-cammy92.c9users.io/api/images/schedule-days/day_2.png";
          "date_title" = "Day 2";
      }
  );
  schedules =     (
              {
          "schedule_date" = "2017-11-04";
          "schedule_date_id" = 4;
          "schedule_description" = "Schedule 7";
          "schedule_end_time" = "14:00:00";
          "schedule_id" = 7;
          "schedule_image" = "https://project-isdental-cammy92.c9users.io/api/images/schedules/day_1.png";
          "schedule_location" = Mumbai;
          "schedule_start_time" = "11:00:00";
      },
              {
          "schedule_date" = "2017-11-04";
          "schedule_date_id" = 4;
          "schedule_description" = "Schedule 8";
          "schedule_end_time" = "14:00:00";
          "schedule_id" = 8;
          "schedule_image" = "https://project-isdental-cammy92.c9users.io/api/images/schedules/day_1.png";
          "schedule_location" = Mumbai;
          "schedule_start_time" = "11:00:00";
      },
              {
          "schedule_date" = "2017-11-04";
          "schedule_date_id" = 4;
          "schedule_description" = "Schedule 9";
          "schedule_end_time" = "14:00:00";
          "schedule_id" = 9;
          "schedule_image" = "https://project-isdental-cammy92.c9users.io/api/images/schedules/day_1.png";
          "schedule_location" = Mumbai;
          "schedule_start_time" = "11:00:00";
      },
              {
          "schedule_date" = "2017-11-05";
          "schedule_date_id" = 5;
          "schedule_description" = "Schedule 10";
          "schedule_end_time" = "14:00:00";
          "schedule_id" = 10;
          "schedule_image" = "https://project-isdental-cammy92.c9users.io/api/images/schedules/day_2.png";
          "schedule_location" = Mumbai;
          "schedule_start_time" = "11:00:00";
      }
  );
  }
  </code></pre>