Trying to separate key-value pairs in nested array (help with RUBY)

Thank you. This solved it. One issue remains. I am getting the data as:

"dr_behaviour_Patient Healer": "1]",

How do I remove the last "]"?