So i have the following json data:
'{"city":"Guarulhos","bot-origin":null,"campaign-source":"attendance bot","lastState":"errorBob","main-installation-date":null,"userid":"c0405312-d97c-4b58-9192-11152c1ee621@tunnel.msging.net","full-name":"Magda dos Santos Silva","alternative-installation-date":null,"chosen-product":"Internet","bank":null,"postalcode":"07013100","due-date":null,"cpf":"45612338813","origin-link":null,"payment":null,"state":"SP","api-orders-hash-id":null,"email":"mah.gata2011@gmail.com","plan-name":"125 Mega","userphone":"11 95287-1231","plan-offer":"687","completed-address":"07013100 - RUA PADRE CELESTINO, 44 - CENTRO, Guarulhos - SP","type-of-person":"CPF","type-of-product":"Residencial","main-installation-period-day":null,"plan-value":"R$89,99","alternative-installation-period-day":null}'
And i want to select only the values "userphone": Phone number(All phone number have the same format) So basically the json response with the phone number. I know i should use a regex but i am not accustomed to then would appreciate any help, specially when there is so many similar values that could interlapse.
Is worth noting i need to interact through a whole column of those json values:
Here is my code:
import re
pattern = re.compile(r'"userphone:"')
phonenumbers=[]
for i in userphone_df['Extras']:
phonenumbers.append(pattern.finditer(i))
I was mostly attempting that is