aboutsummaryrefslogtreecommitdiffstats
path: root/src/JSON.js
diff options
context:
space:
mode:
authorMisko Hevery2011-08-17 12:21:43 -0700
committerIgor Minar2011-10-11 10:53:03 -0700
commite134a8335f5ee7d2e81034ed93f3e465cb14573f (patch)
treea01dc685708c5db9e1e564853bb292d6f7ad7a7a /src/JSON.js
parent8ee32a75f07da96ec1cc4a8474a9a53e5c2aca98 (diff)
downloadangular.js-e134a8335f5ee7d2e81034ed93f3e465cb14573f.tar.bz2
fix(filter): make json filter ignore private properties
Diffstat (limited to 'src/JSON.js')
-rw-r--r--src/JSON.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/JSON.js b/src/JSON.js
index 1dc5cc03..7fdbf1a1 100644
--- a/src/JSON.js
+++ b/src/JSON.js
@@ -126,7 +126,7 @@ function toJsonArray(buf, obj, pretty, stack) {
var childPretty = pretty ? pretty + " " : false;
var keys = [];
for(var k in obj) {
- if (obj.hasOwnProperty(k) && obj[k] !== undefined) {
+ if (k!='this' && k!='$parent' && k.substring(0,2) != '$$' && obj.hasOwnProperty(k) && obj[k] !== undefined) {
keys.push(k);
}
}