Angular JS - How to get spring returned map value inside angular controller?
<p>I am new to angular, can anyone tell me how to retrieve spring returned map value inside angular's controller? 
Here is my code snippet: </p>

<p>app.js</p>

<pre><code>   // Service -----------------------------------------------------------------
myApp.service('FolderService', function ($log, $resource, $http) {
    return {
        onlineView: function(docId) {
            var viwerResource = $resource('processOnlineView', {}, {
                get: {method: 'POST', params: {'docId' : docId}}
            });
            return viwerResource.get();
        }       
    }
})

// Controller -----------------------------------------------------------------
.controller('FolderController', function ($scope, $log, FolderService) {        
    //click online view         
    $scope.view = function(doc) { 
        var rtnMap = FolderService.onlineView(doc.cmObjectId);
        console.log('rtnMap: ' + rtnMap );  
        // it shows rtnMap: [object Object]
        var key = 'response'; 
        var value = rtnMap[key];
        console.log('value: ' + value ); 
       // I want to get map value, but it shows undefined
       // I except get "d:/tomcat/bin/hello.swf" here
        $scope.rtnFileName = rtnMap;
    }        
}); 
</code></pre>

<p>my spring controller java code</p>

<pre><code>@RequestMapping(value = "/processOnlineView", method = RequestMethod.POST)
public @ResponseBody Map&lt;String, String&gt; processOnlineView(@RequestParam(value = "docId") String docId) {
    String resultDocName = "";
    try {
        // get File by docId
        File file = queryFile(docId);    

       // set resultDocName value
        resultDocName = file.getAbsolutePath(); // real file path, like: d:/tomcat/bin/hello.swf
    } catch (Exception e) {
        e.printStackTrace();
        }
    return Collections.singletonMap("response", resultDocName);
    }    
</code></pre>

<p>chrome log:
<a href="https://i.stack.imgur.com/XT2JM.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XT2JM.gif" alt="chorme log"></a></p>

<p>I can get expect value in html by using this:</p>

<p><code>rtnFileName: {{rtnFileName.response}}</code></p>

<p>html shows:</p>

<pre><code>rtnFileName: d:/tomcat/bin/hello.swf
</code></pre>

<p>But how to get map value in angular controller directly?
Any suggestion would be appreciated. </p>