As we start to work more and more with angular and other Javascript dependent frameworks, you will run into a situation where you want to know what are the values of an element in an object.

for example, if i have an object called colors:

$scope.colors= {color: 'blue'};

and now you want to show colors in an alert like this:

alert($scope.colors);

the output will be like this:
[object Object]

to bypass and show all the values in the object, do it like this intead:

alert(JSON.stringify($scope.colors));