Import Test Data - JSON as string

I’m not sure if this is the expected behavior; but when I “Import Test Data” I get something like this:

vars = {
...,
  companyInfo: '{\n  "mission": "Not found in search results",\n  "vision": "Elevate your tech career WITH ACCESS TO EXCLUSIVE JOBS IN NORTH AMERICA",\n  "values": [\n    "Personalized approach",\n    "Networking opportunities",\n    "Access to risk-free, quality opportunities",\n    "Flexible work environments",\n    "Better compensation",\n    "Dedicated talent advisors"\n  ],\n  "additionalInfo": {\n    "founded": "Not found in search results",\n    "headquarters": "Mattoon, Illinois",\n    "employees": "Not found in search results",\n    "industry": "Technical Recruitment"\n  }\n}',
..,
}

As the companyInfo here is not a valid JSON object and just a string; I have to clean it up so that it renders correctly in the Generate Asset block and I can use the Live Preview efficiently to check my work.

Is there a workaround for this?

Hi @bkermen,

Thank you for bringing this to our attention!

We’ll look into what’s causing this behavior and follow up as soon as we have more details.

1 Like

Thanks for the update @Alex_MindStudio.

I have another similar issue with “Import Test Data” functionality. Sometimes, a variable holds a large amount of data and I get a reference to a remote variable, something like:

vars = {
  ...,
  analysisResults: '@@remote_variable@@https://youai-appdata-private.s3-accelerate.amazonaws.com/...&response-content-type=application%2Fjson',
  ...,
}

The link does resolve to the actual JSON object; however when I reference such a remote variable in my template (HTML), it does not render correctly. It behaves as if this variable is empty or null.

Hi @bkermen,

It’s likely that the variable needs to be referenced differently.

Could you please share a Loom with an overview of your setup, an example of the issue in the Debugger tab, and the HTML code you’re using? That would help me get a better understanding of what might be causing it to render incorrectly.