Since you know the format of the response all you need to do is a quick extraction and pass that on to your api call. If you are getting back:
{ "key": "vmName" ,"value" : {"type":"string","value" :"MyVirtualMachine"} }
just do something like this:
var passThisValueToApi = JSON.parse(whateverVariableHoldsYourResponse).value.value;