title: How to remove or prevent escape slashes from json-file data in azure logic app workflow
body: <p><strong>Situation</strong></p>
  
  <p>I'm using Azure Logic App to do the following steps:</p>
  
  <ol>
  <li>Load/read a JSON file from blob storage. This file is created and written in R, using the toJSON function fromt JSONlite package</li>
  <li>Get de file content from this JSON file</li>
  <li>Convert it to a JSON format (using expression json())</li>
  <li>Insert the converted output into a Azure Table Storage</li>
  </ol>
  
  <p>Please look at the screenshot for this workflow</p>
  
  <p><a href="https://i.stack.imgur.com/q86kS.png" rel="nofollow noreferrer">azure workflow</a></p>
  
  <p>I've created a JSON-file in R (using the JSONlite package). When printed in the R console, it looks fine:</p>
  
  <pre><code>{"PartitionKey":"pdf","RowKey":"robject)test","nr":"24330087","status":true}
  </code></pre>
  
  <p>This is the 'formatting' I want. When in this format, it inserts smoothly with logic app into the azure table storages.</p>
  
  <p><strong>Problem</strong></p>
  
  <p>But when I write the JSON-file above to Azure Blob, and use this file as input in a logic app workflow, these escape slashes cause problems</p>
  
  <p>The file from the blob storage isn't interpreted by logic app in the desired format (without escape slashed) It includes the escape slashes (). And I think this causes the problems in logic apps. I pasted a hardcoded format without these slashes. And this worked. But hard coding isn't an option here.</p>
  
  <p>Below the format the logic app 'json()' expression makes of it. It includes the dreaded escapes.</p>
  
  <pre><code>[
    "{\"PartitionKey\":\"pdf\",\"RowKey\":\"coolblue_factuur_1744212700.pdf\",\"kvknr\":\"24330087\",\"active_status\":true}"
  ]
  </code></pre>
  
  <p>And then this Error occurs:</p>
  
  <pre><code>{
    "odata.error": {
      "code": "InvalidInput",
      "message": {
    "lang": "en-US",
    "value": "An error occurred while processing this request.\nRequestId:xxxx\nTime:2019-11-20T09:02:46.6051827Z"
  }
    }
  }
  </code></pre>
  
  <p>After some online research, it looks like Logic App is having difficulty with the escape slashes () and the dubble quotes it escapes ("). So all these (\") escapes are choking the flow.</p>
  
  <p><strong>Question</strong></p>
  
  <p>How to deal with \" (escape slashes?). All I want is that logic app can correctly read the JSON-file from blob storage, convert it and instert the data into the table storage.
  So ideally: convert the JSON file from blob storage into a format without escape slashes. I tried to pre process this in R, but this did not work.</p>
  
  <p><strong>Extra info</strong></p>
  
  <p>Below you can find the steps I took in logic app:</p>
  
  <p>The JSON file uploaded (and fetched) from blob storage</p>
  
  <pre><code>{
  "headers": {
      "Pragma": "no-cache",
      "Transfer-Encoding": "chunked",
      "Retry-After": "15",
      "Vary": "Accept-Encoding",
      "x-ms-request-id": "xxxx",
      "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
      "X-Content-Type-Options": "nosniff",
      "X-Frame-Options": "DENY",
      "Timing-Allow-Origin": "*",
      "x-ms-apihub-cached-response": "true",
      "Cache-Control": "no-store, no-cache",
      "Date": "Wed, 20 Nov 2019 09:09:52 GMT",
      "Location": "https://[location url]",
      "Set-Cookie": "[cookieset]",
      "Content-Type": "application/json",
      "Expires": "-1",
      "Content-Length": "452"
  },
  "body": {
      "Id": "xyz",
      "Name": "robjecttest_parameters_db.json",
      "DisplayName": "robjecttest_parameters_db.json",
      "Path": "/path/robjecttest_parameters_db.json",
      "LastModified": "2019-11-20T09:09:39Z",
      "Size": 95,
      "MediaType": "application/octet-stream",
      "IsFolder": false,
      "ETag": "\"[etag]\"",
      "FileLocator": "[filelocations]",
      "LastModifiedBy": null
  }
  }
  </code></pre>
  
  <p>From the headers, the content type is 'JSON'. But the body (which is the data I want) it is 'octet-stream').</p>
  
  <p>After a 'get filecontent' action:</p>
  
  <pre><code>{
    "$content-type": "application/octet-stream",
    "$content": "[content]"
  }
  </code></pre>
  
  <p>Next step is to convert/cast the 'body-data' to a JSON format. Using the expression &amp; dynamic content from logic APP</p>
  
  <pre><code>json(body('Get_blob_content'))
  </code></pre>
  
  <p>Use this 'output' as an entity to insert into the table storage.</p>