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.
🌐
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
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.
🌐
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 ...
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....
🌐
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.
🌐
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 ·
🌐
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.
🌐
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.
🌐
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.

🌐
Tutorial Reference
tutorialreference.com › javascript › examples › faq › javascript-how-to-fetch-and-display-json-data-in-html
How to Fetch and Display JSON Data in HTML using JavaScript | Tutorial Reference
Status: ${response.status}`); } ... programmatically and set its content using the .textContent property. ... Get a reference to the container element where you want to display the data....
🌐
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.