This page (revision-1) was last changed on 29-Nov-2024 16:16 by UnknownAuthor

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 added 50 lines
!!! Overview[1]
[{$pagename}] is a data structure within [JavaScript Object Notation] ([JSON])
!! [{$pagename}] Syntax
Example:
%%prettify
{{{
{ "name":"John", "age":30, "car":null }
}}} /%
[{$pagename}] are surrounded by curly braces {}.
[{$pagename}] are written in key/value pairs.
Keys must be strings, and values must be a valid JSON data type (string, number, object, array, boolean or null).
Keys and values are separated by a colon.
Each key/value pair is separated by a comma.
Accessing [{$pagename}] Values
You can access the object values by using dot (.) notation:
%%prettify
{{{
myObj = { "name":"John", "age":30, "car":null };
x = myObj.name;
}}} /%
!! Nested [{$pagename}]
Values in a [{$pagename}] can be another [{$pagename}].
Example:
%%prettify
{{{
myObj = {
"name":"John",
"age":30,
"cars": {
"car1":"Ford",
"car2":"BMW",
"car3":"Fiat"
}
}
}}} /%
!! More Information
There might be more information for this subject on one of the following:
[{ReferringPagesPlugin before='*' after='\n' }]
----
* [#1] - [JSON Objects|https://www.w3schools.com/js/js_json_objects.asp|target='_blank'] - based on information obtained 2017-07-11-