added method to retrieve json result from message