I need to convert only one line of text in JSON not list.
I've read documents but didn't get anything.
Which JS I need to use?
Can you share an example of the Text you might put on the Text Area? The JSON deserialize also works for a single record.
If the definition of the the JSON is dynamic, meaning that in the text area you can put different types of JSON, then you will have to process that in Javascript. You can use a Javascript Node, and use "JSON.parse() " and output the result as an object:
But then I don't know how you want to use that object.
How are you going to use the result JSON on the OutSystems side?
Don't meet your needs?
no maria it will take list that needs to be converted but I'm not having list
just a text I need to convert.
Hello Saransh,
Are you saying you want to isolate one line from a long text and turn it into a JSON? Do you want to convert it to a JSON in a Javascript node? What do you want to use that JSON for in OutSystems?
You have the JSON deserialize action where you can convert a JSON in text form to a Structure on the OutSystems side.
Can you elaborate on your issue?
Best Regards,
Miguel Amado
I'm having a text area then whatever output I'm getting from that text area then that text ony I need to convert to JSON format.
thanks miguel I think by this I got my answer.
@Miguel Amado
I need to pass single text which is username in text format need to be converted to JSON format and pass it to Jira rest api
try to use eval() function like this : -
var json = eval('(' + yourUsername+ ')');
Yeah,I found that username need to given inside double quotation marks and no need of JSON format to pass inside Jira api.
Thanks @Saransh