title: Logic Apps - Iterate over JSON output from HTTP call
body: <p>We are using Azure Logic apps HTTP connector to call a REST service based on the output returned from another REST service in the previous step. The first service is returning a JSON array output as below. The requirement is to loop over the JSON output from Service 1 and construct the URL for service 2 based on the Service 1 output. How do we achieve this in Logic apps ?</p>
  
  <pre><code>{
    "totalSize": 32,
    "done": true,
    "records": [
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFueGAG"
        },
        "Id": "0AT58000002YFueGAG",
        "EventType": "ApexCallout",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFueGAG/LogFile",
        "LogFileLength": 847342
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFufGAG"
        },
        "Id": "0AT58000002YFufGAG",
        "EventType": "ApexExecution",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFufGAG/LogFile",
        "LogFileLength": 9988277
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFugGAG"
        },
        "Id": "0AT58000002YFugGAG",
        "EventType": "ApexSoap",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFugGAG/LogFile",
        "LogFileLength": 54684
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuhGAG"
        },
        "Id": "0AT58000002YFuhGAG",
        "EventType": "ApexTrigger",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuhGAG/LogFile",
        "LogFileLength": 8193546
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuiGAG"
        },
        "Id": "0AT58000002YFuiGAG",
        "EventType": "API",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuiGAG/LogFile",
        "LogFileLength": 14060431
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFujGAG"
        },
        "Id": "0AT58000002YFujGAG",
        "EventType": "AsyncReportRun",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFujGAG/LogFile",
        "LogFileLength": 120591
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFukGAG"
        },
        "Id": "0AT58000002YFukGAG",
        "EventType": "BulkApi",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFukGAG/LogFile",
        "LogFileLength": 34181
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFulGAG"
        },
        "Id": "0AT58000002YFulGAG",
        "EventType": "ChangeSetOperation",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFulGAG/LogFile",
        "LogFileLength": 2088
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFumGAG"
        },
        "Id": "0AT58000002YFumGAG",
        "EventType": "ContentDistribution",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFumGAG/LogFile",
        "LogFileLength": 26642
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFunGAG"
        },
        "Id": "0AT58000002YFunGAG",
        "EventType": "ContentDocumentLink",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFunGAG/LogFile",
        "LogFileLength": 585
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuoGAG"
        },
        "Id": "0AT58000002YFuoGAG",
        "EventType": "ContentTransfer",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuoGAG/LogFile",
        "LogFileLength": 382007
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFupGAG"
        },
        "Id": "0AT58000002YFupGAG",
        "EventType": "Dashboard",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFupGAG/LogFile",
        "LogFileLength": 114791
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuqGAG"
        },
        "Id": "0AT58000002YFuqGAG",
        "EventType": "DocumentAttachmentDownloads",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuqGAG/LogFile",
        "LogFileLength": 1209090
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFurGAG"
        },
        "Id": "0AT58000002YFurGAG",
        "EventType": "LightningError",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFurGAG/LogFile",
        "LogFileLength": 25307
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFusGAG"
        },
        "Id": "0AT58000002YFusGAG",
        "EventType": "LightningInteraction",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFusGAG/LogFile",
        "LogFileLength": 274278
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFutGAG"
        },
        "Id": "0AT58000002YFutGAG",
        "EventType": "LightningPageView",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFutGAG/LogFile",
        "LogFileLength": 26230
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuuGAG"
        },
        "Id": "0AT58000002YFuuGAG",
        "EventType": "LightningPerformance",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuuGAG/LogFile",
        "LogFileLength": 624009
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuvGAG"
        },
        "Id": "0AT58000002YFuvGAG",
        "EventType": "LoginAs",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuvGAG/LogFile",
        "LogFileLength": 28942
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuwGAG"
        },
        "Id": "0AT58000002YFuwGAG",
        "EventType": "Login",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuwGAG/LogFile",
        "LogFileLength": 1295153
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuxGAG"
        },
        "Id": "0AT58000002YFuxGAG",
        "EventType": "Logout",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuxGAG/LogFile",
        "LogFileLength": 123331
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuyGAG"
        },
        "Id": "0AT58000002YFuyGAG",
        "EventType": "MetadataApiOperation",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuyGAG/LogFile",
        "LogFileLength": 69656
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuzGAG"
        },
        "Id": "0AT58000002YFuzGAG",
        "EventType": "QueuedExecution",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFuzGAG/LogFile",
        "LogFileLength": 2273083
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv0GAG"
        },
        "Id": "0AT58000002YFv0GAG",
        "EventType": "Report",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv0GAG/LogFile",
        "LogFileLength": 54853
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv1GAG"
        },
        "Id": "0AT58000002YFv1GAG",
        "EventType": "ReportExport",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv1GAG/LogFile",
        "LogFileLength": 12399
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv2GAG"
        },
        "Id": "0AT58000002YFv2GAG",
        "EventType": "RestApi",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv2GAG/LogFile",
        "LogFileLength": 1145345
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv3GAG"
        },
        "Id": "0AT58000002YFv3GAG",
        "EventType": "SearchClick",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv3GAG/LogFile",
        "LogFileLength": 47944
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv4GAG"
        },
        "Id": "0AT58000002YFv4GAG",
        "EventType": "Search",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv4GAG/LogFile",
        "LogFileLength": 178250
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv5GAG"
        },
        "Id": "0AT58000002YFv5GAG",
        "EventType": "Sites",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv5GAG/LogFile",
        "LogFileLength": 1492182
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv6GAG"
        },
        "Id": "0AT58000002YFv6GAG",
        "EventType": "TimeBasedWorkflow",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv6GAG/LogFile",
        "LogFileLength": 199635
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv7GAG"
        },
        "Id": "0AT58000002YFv7GAG",
        "EventType": "TransactionSecurity",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv7GAG/LogFile",
        "LogFileLength": 3441403
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv8GAG"
        },
        "Id": "0AT58000002YFv8GAG",
        "EventType": "URI",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv8GAG/LogFile",
        "LogFileLength": 13043228
      },
      {
        "attributes": {
          "type": "EventLogFile",
          "url": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv9GAG"
        },
        "Id": "0AT58000002YFv9GAG",
        "EventType": "VisualforceRequest",
        "LogDate": "2018-06-12T00:00:00.000+0000",
        "LogFile": "/services/data/v32.0/sobjects/EventLogFile/0AT58000002YFv9GAG/LogFile",
        "LogFileLength": 8839856
      }
    ]
  }
  </code></pre>