latestHttpResponse/Content as JSON

Hi all,   I have a Call REST (POST) action in one of my microflows with custom error handling. I’d like to display an error message sent by the service. The error message body is stored in the $latestHttpResponse variable, but the whole message is a JSON structure. Now I have this JSON as a string stored in $latestHttpResponse/Content. The JSON looks like this: {   "@odata.context": ...",   "@odata.type": "...",   "Succeeded": false,   "Error": {     "ErrorCode": 1,     "ErrorMessage": "this should be displayed"   } }   Is there any possibility to retrieve the ErrorMessage from this structure without using all kinds of string functions? Or should I write a Java action for this?   Thanks
1 answers


Create a JSON Structure in Mendix that maps the returned JSON to entities inside of your app.  When you get an error, use the Import with Mapping action to import the JSON in $latestHttpResponseContent  into Mendix entities so you can display it the way you want to.

Hope that helps,