I have the following string returned from a server:
{"href":"about:blank#&executeFunction<-finishedStroke&&arguments<-{\"base64DataUrl\":\"data:image/png;base64,iVBORw0KGgoAAErkJggg==\"}&"}
I want to extract data:image/png;base64,iVBORw0KGgoAAErkJggg==
(the base64DataURL part) from it. What's the best way to do this with Javascript?
Please note that I am asking how to parse values from JSON. This is not the same as this question, which asks how to extract fields from nested objects and arrays.
What I've tried: I have tried
JSON.parse(<string>).href.split('base64DataUrl":"')[1].split('"')[0]
which yields the right answer, but I'm hoping for a more concise solution.