Angularjs Examples

AJS Examples


AngularJS Json Filter

In AngularJS json filter is used to get json string from provided javascript object or json object.

Syntax

{{ javascript or json object | json }}

AngularJS Json Filter Example

<html>
<head>
<title>My first AngularJS Json Filter code</title>
<Script SRC="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js">
</Script>
</head>
<body>
<div ng-app="">
<p>Json Filter : {{ [ {text : "one"}, {text : "two"}, {text : "three"} ] | json }}</p>
</div>
</body>
</html>
See Live Example