How to extract part of text

Hi there I have this information:

"options":
"{"group_name":"Hosting Packages","local_group_name":"Hosting Packages","local_category_name":"Cheap SSD Hosting","category_name":"Cheap SSD Hosting","category_id":"164","selected_price":"1167","domain":"kjhjkhkjhkj.com","panel_type":"","panel_link":"","disk_limit":"unlimited","bandwidth_limit":"unlimited","email_limit":"unlimited","database_limit":"unlimited","addons_limit":"unlimited","subdomain_limit":"unlimited","ftp_limit":"unlimited","park_limit":"unlimited","max_email_per_hour":"unlimited","dns":{"ns1":"","ns2":"","ns3":"","ns4":""},"established":true}",

image

And I need extract the domain name:

Name=Domain
Value=kjhjkhkjhkj.com

It´s possible?

Beforehands, thanks for all help.

Hi @cc546451, welcome to the community :tada:

Looks like your option value is a string consisting of JSON. So in order to further process it you’d need to parse it. JSON.parse() can help with that, in n8n you could use it like so:

Once you have parsed the JSON-string you can access all properties in n8n as usual:

I hope this helps! Let me know if you run into any trouble with this :slight_smile:

2 Likes

Wow works perfect, thank you! I use regex (I read this topic ) And an hour ago I find the way to use regex. But this is 1000% better. Thank you!

1 Like

Glad to hear this helped, thanks so much for confirming :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.