angularjs using .map is not a function
<p>Trying to manipulate the response.data to add <code>isLoggedin = true</code> in the response using <code>.map</code> but its giving me an error of "map" is not a function. </p>

<pre><code>vm.dataResponse = response.data.map(function(data){
  data.isLoggedIn = false;
});
</code></pre>

<p>Trying to do this so I can have a data to reference whether the user is logged in or not to show (login/sign out). Or I could use <code>$rootScope</code>but I thought using global is not ideal?</p>

<pre><code>    $rootScope.isLoggedIn = false;
</code></pre>

<p>then in my vm.login function the <code>$rootScope</code> will then be set to <code>true</code>, this works but when I refresh the page it goes back to false.</p>