javascript how to simulate function global scope for Json statement?

Posted by guaike on Stack Overflow See other posts from Stack Overflow or by guaike
Published on 2010-05-21T18:40:16Z Indexed on 2010/05/21 18:40 UTC
Read the original article Hit count: 187

Filed under:
|
var testJson=

{ a1: 1, a2: this.a1+1 }

and the result should be:

var testJson=

{ a1: 1, a2: 2 }

© Stack Overflow or respective owner

Related posts about JSON

Related posts about JavaScript