4 Replies Latest reply on Dec 10, 2015 2:39 PM by BKBK

    I am having a problem looping over an array created from Groupon JSON file.


      I'm sure this is a simple thing to do, sadly I'm stuck! Any help would be appreciated.


      I need to create a query from a json file from Groupon. I can get the file, deserialize it but then I just run into a brick wall!


      <!--- Make the request to the API --->


      <!--- Get the JSON Feed --->


      <cfhttp url="https://partner-int-api.groupon.com/deals.json?country_code=IE&tsToken=IE_AFF_0_200012_212 556_0&division_id=dublin&offset=0&limit=20">


      <!--- Strip the function wrapper. --->

      <cfset theData=REReplace(cfhttp.FileContent, 


      <cfset theData=REReplace(theData, "\s*\)\s*$", "")>


      <!--- Test JSON data. --->


      <cfif !IsJSON(theData)>


          <h3>The URL you requested does not provide valid JSON</h3>




      <cfdump var="#theData#">




      The file is at: http://www.thefuture.tv/grouponJSON.cfm