How do i convert a string to python dictionary? I get the string in the following format as input from different application.
{ foo1 = [ "User1", "User2" ] bar1 = [ "User3", "User4" ] }
{ foo2 = [ "User5", "User6" ] }
{ foo3 = ["User7", "User8"] bar2 = [ "User9", "User10", "User 11" ] moo = ["User12"] }
I have to convert to the following format in python dictionary.
{ "foo1" : "User1,User2" , "bar1" : "User3,User4" }
{ "foo2" : "User5,User6" }
{ "foo3" : "User7" , "bar2" : "User9,User10,User 11" , "moo" : "User12"}
bar2really gets scrunched into one string that's comma separated? Seems odd...