How would I convert the following string to an array with Python (this string could have an indefinite number of items)?
'["Foo","Bar","Baz","Woo"]'
This is definitely a string representation as well. type()
gave:
<class 'str'>
I got it.
interestedin = request.POST.get('interestedIn')[1:-1].split(',')
interested = []
for element in interestedin:
interested.append(element[1:-1])
Where request.POST.get('interestedIn')
gave the '["Foo","Bar","Baz","Woo"]'
string list "thing".