Rear Brake Hose Removal ML500

I'm replacing all 4 brake hoses. I've finished the front ones but the rear ones are creating a problem, not sure how to remove the old ones from top of the hose. The bottom end of the hose is easily undone from the caliper, but the top end is an unknown set up. I don't want to guess as I might do some damage. Looking for some solution to undo the top end of the rear brake hoses on my 2006 ML500.
Thanks,


