I have a vector of strings of the following kind:
{'id': '123', 'text': 'What should I buy today?', 'choices':[{'value': 'Bread', 'label': 'You need to buy bread', 'selected': True}, {'value': 'Milk', 'label': 'You need to buy milk', 'selected': False}, {'value': 'Chips', 'label': "You need to buy chips", 'selected': False}]}
I would like to create a column made of only the sentences which end with
'selected': True
For example, regarding the above string I would get
You need to buy bread
As of now, I could only write the following command:
=MID(LEFT(A1,FIND(", 'selected': True",G5)-1),FIND("label':",G5)+7,LEN(G5))
But, in case the action selected ('selected': True) is not the first one of the list, it won't work.
New added:


