[Solved] How can I separate a string and make a new line

Hi guys! I need help. I have this JSON output:


For now, blip bot gives me this output:


But I wanted the bot to achieve this output:




I was using Integromat to get JSON API.

How can you make /n as new line in blip?

Hi @Erika_Anne_Baravio,

unfortunantly, if you use a variable like {{yourJson@text}} BLiP will not understand the special characters.
In order to change this behavior you must use an Execute Script action that just return the string with ‘\n’ characters.

Look a sample below:

Note that the Execute Script action returns a new variable with name {{test}}.

When you use it, you will see the string exactly as you want.

Hi Rafael. Thanks so much for the help. :slight_smile: But what if the json output came from a url?

But there seems to be a problem with my code. Since I’m getting the json output from a url.

Here’s my set up.


you are using the script in a wrong way.
You can’t use displayMenu variable inside of the script. This variable will receive the return of your script.

So basically, your script must be:

function run(menu){
   menu = JSON.parse(menu);
   return menu.text;

That solves my problem. I was trying that code yesterday. Idk what happened. :sweat: but thank you so so much rafael :slight_smile: