Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

Urgent : how do i clean the data in this format

I have this set of column where their data are display as :

{'id': 20921262, 'value': 'call'}

{'id': 20921262, 'value': 'feedback_tab'}

I just want the value for call , feedback_tab for the two example above. Meaning is after 'value' :

How can i code it to achieve the output

1 Solution

Accepted Solutions
adamdavi3s
Master
Master

Actually this is a little cleaner and more secure:

TextBetween(putyourfieldnamehere,'value'&chr(39)&': '&chr(39),chr(39)&'}') as test;

View solution in original post

6 Replies
adamdavi3s
Master
Master

What you have there is an Array (sorry not JSON) there should be a good number of threads which can help load this.

WHat is the raw data source as it might be easier to load from there properly rather than parsing a string

n1ef5ng1
Creator
Creator
Author

is actually retrieving by web scrapping using python. that is the best output that we can work from now though...

adamdavi3s
Master
Master

Ok in that case this code will work for this very specific example!

purgechar(TextBetween(putyourfieldnamehere,'value'&chr(39)&':','}'),chr(39)) as test;

adamdavi3s
Master
Master

Actually this is a little cleaner and more secure:

TextBetween(putyourfieldnamehere,'value'&chr(39)&': '&chr(39),chr(39)&'}') as test;

n1ef5ng1
Creator
Creator
Author

wow thanks. it works. initially i use mid, diden know about this text between. thanks!

adamdavi3s
Master
Master

No worries at all, its a very handy feature for parsing text!