Old question but some possibly new answers like JSON Spec and JSON Reference https://json-spec.readthedocs.io/reference.html

[{
  "name": "John",
 },
 {
  "name" : "Jack",
  "parent": {"$ref": "#/0"}
 },
 ...
]

or possibly better with JSON Path syntax http://goessner.net/articles/JsonPath/

[{
  "name": "John",
 },
 {
  "name" : "Jack",
  "parent": {".[?(@.name=='John')]"}
 }, 
...
]
Answer from Vlad on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › JSON
JSON - JavaScript - MDN Web Docs
The JSON namespace object contains static methods for parsing values from and converting values to JavaScript Object Notation (JSON).
🌐
W3Schools
w3schools.com › jsref › › jsref_obj_json.asp
JavaScript JSON Reference
JSON is text, and text can be transported anywhere, and read by any programming language. JavaScript Objects can be converted into JSON, and JSON can be converted back into JavaScript Objects.
Discussions

javascript - Are references possible in JSON? - Stack Overflow
Javascript doesn't have explicit objects references. What are you trying to do? ... I will traverse those values and perform some operations like changing name of the person. ... If this is about JSON, then it does not have anything to do with JavaScript, and vice versa. More on stackoverflow.com
🌐 stackoverflow.com
refer to an element of JSON (Javascript) object - Stack Overflow
How do I refer to an element of JSON (Javascript) object. More on stackoverflow.com
🌐 stackoverflow.com
[JSON] Is it possible to self-reference values in a JSON declaration?

No, JSON is essentially represented as a string. Nodes JSON.stringify will attempt to convert 100 + this.armour to a primitive value (in this case NaN), but other implementations of stringifywould perhaps render it as a single string that when parsed would result in a string "100 + this.armour".

If I were you, I would store the stringified object only with values that can be represented as primitive values. Then, when you parse the JSON string into a JS object, pass it into a function that will compute the additional properties that rely on other properties.

More on reddit.com
🌐 r/javascript
34
8
May 8, 2016
How to reference javascript json - Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most · Connect and share knowledge within a single location that is structured and easy to search More on stackoverflow.com
🌐 stackoverflow.com
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › JSON › parse
JSON.parse() - JavaScript - MDN Web Docs
JSON.parse() parses a JSON string according to the JSON grammar, then evaluates the string as if it's a JavaScript expression. The only instance where a piece of JSON text represents a different value from the same JavaScript expression is when dealing with the "__proto__" key — see Object ...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Learn_web_development › Core › Scripting › JSON
Working with JSON - Learn web development | MDN
You should also refer back to our JavaScript object basics article for more information on dot and bracket notation. Finally, we need to call our top-level populate() function: ... The above example was simple in terms of accessing the JavaScript object, because we converted the network response directly into a JavaScript object using response.json().
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › JSON › stringify
JSON.stringify() - JavaScript - MDN Web Docs
July 10, 2025 - If you are using JSON.stringify() to deep-copy an object, you may instead want to use structuredClone(), which supports circular references. JavaScript engine APIs for binary serialization, such as v8.serialize(), also support circular references.
Find elsewhere
🌐
GitHub
github.com › vivocha › jsonref
GitHub - vivocha/jsonref: A simple Javascript library implementing the JSON Reference and the JSON Pointer specifications. · GitHub
Resolve $ref references in JSON documents, handle external references, and manipulate JSON data using JSON Pointer syntax.
Starred by 15 users
Forked by 3 users
Languages   TypeScript 99.9% | JavaScript 0.1%
🌐
W3Schools
w3schools.com › js › js_json.asp
JavaScript JSON
JS Examples JS HTML DOM JS HTML ... Study Plan JS Interview Prep JS Bootcamp JS Certificate JS Reference ... JSON stands for JavaScript Object Notation....
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-json-complete-reference
JavaScript JSON Complete Reference - GeeksforGeeks
July 23, 2025 - JavaScript JSON Objects · 3 min read · JavaScript Object Reference · 4 min read · Functions in JavaScript · 5 min read · How to write a function in JavaScript ? 4 min read · JavaScript Function Call · 2 min read · Different ways of writing functions in JavaScript ·
🌐
W3Schools
w3schools.com › js › js_json_objects.asp
JSON Object Literals
The data is only JSON when it is in a string format. When it is converted to a JavaScript variable, it becomes a JavaScript object.
🌐
Wikipedia
en.wikipedia.org › wiki › JSON
JSON - Wikipedia
March 6, 2005 - JSON was based on a subset of the JavaScript scripting language (specifically, Standard ECMA-262 3rd Edition—December 1999) and is commonly used with JavaScript, but it is a language-independent data format.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › JSON › rawJSON
JSON.rawJSON() - JavaScript - MDN Web Docs
July 10, 2025 - The JSON.rawJSON() static method creates a "raw JSON" object containing a piece of JSON text. When serialized to JSON, the raw JSON object is treated as if it is already a piece of JSON. This text is required to be valid JSON.
🌐
Programiz
programiz.com › javascript › json
JavaScript and JSON (with Examples)
JSON was derived from JavaScript. So, the JSON syntax resembles JavaScript object literal syntax.
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-work-with-json-in-javascript
How To Work with JSON in JavaScript | DigitalOcean
August 26, 2021 - To understand how this works, let’s consider the JSON object sammy: var sammy = { "first_name" : "Sammy", "last_name" : "Shark", "online" : true } In order to access any of the values, we’ll be using dot notation that looks like this: ... The variable sammy is first, followed by a dot, followed by the key to be accessed. To create a JavaScript alert that shows us the value associated with the key first_name in a pop-up, we can do so by calling the JavaScript alert() function:
🌐
W3Schools
w3schools.com › js › js_json_syntax.asp
JSON Syntax
A name/value pair consists of a field name (in double quotes), followed by a colon, followed by a value: ... JSON names require double quotes. The JSON format is almost identical to JavaScript objects.
🌐
Reddit
reddit.com › r/javascript › [json] is it possible to self-reference values in a json declaration?
r/javascript on Reddit: [JSON] Is it possible to self-reference values in a JSON declaration?
May 8, 2016 -

Hey peeps,

Okay, so, just playing with making a wee CCG and storing the stats in a JSON object, but some of the stats are self-referential and I was wondering if there was a way around this. FOR EXAMPLE :

var cardOne = {
  name : "Example Card",
  armour : 70,
  courage : 100 + this.armour
};

Now, I know that this.armour won't work in this context, but what would?

Any help would be grand. Thanks in advance!

-P


EDIT 1: okay, seeing as this is Chrome-only project I've decided to take advantage of ES6's class notation and implement it like this :

 class Card {
     constructor(_name, _armour){
         name  = _name;
         armour = _armour;
         courage = 100 + _armour;
     }
 }
 var testCard = new Card("Example Card", 70);

...and that's how it'll stay for now, but if you can point me towards a more efficient alternative then that'd be great!


EDIT 2: as u/talmobi/ pointed out, this is the equivalent of simply writing :

var Card = function(_name, _armour){
    this.name = _name;
    this.armour = _armour;
    this.courage = 100 + _armour;
};
var testCard = new Card("Example Card", 70);

Well...that's not exactly what they said, but you can read their full comment here.

🌐
W3Schools
w3schools.com › js › js_json_arrays.asp
JSON Arrays
JS Examples JS HTML DOM JS HTML Input JS HTML Objects JS HTML Events JS Browser JS Editor JS Exercises JS Quiz JS Website JS Syllabus JS Study Plan JS Interview Prep JS Bootcamp JS Certificate JS Reference ... Arrays in JSON are almost the same as arrays in JavaScript.
🌐
JavaScript.info
javascript.info › tutorial › the javascript language › data types
JSON methods, toJSON
JSON supports plain objects, arrays, strings, numbers, booleans, and null. JavaScript provides methods JSON.stringify to serialize into JSON and JSON.parse to read from JSON.
🌐
Stack Overflow
stackoverflow.com › questions › 56977257 › how-to-reference-javascript-json
How to reference javascript json - Stack Overflow
But I can't seem to reference this data: $("#treelist").data('kendoTreeList').dataSource._pristineData[0].DepartmentCode · It says: Uncaught TypeError: Cannot read property 'DepartmentCode' of undefined · So I tried this: $("#treelist").data('kendoTreeList').dataSource._pristineData and it just shows this: How can I get 080 DepartmentCode? I tried this $("#treelist").data('kendoTreeList').dataSource._online and got true · Thanks! javascript · json ·