I have used jq[https://stedolan.github.io/jq/] command line JSON processor to process the clusterInfo JSON response and extract the haState value from it.
If the JSON is stored in a file, then you could use the below script. Make sure that you install jq package first.
jq '.clusterInfo.haState' clusterInfo.json
If you want to access the service and parse the response on the fly, then use the below CURL command
curl 'http:///ws/v1/cluster/info' | jq -r '.clusterInfo.haState'