Q:

How to Pass an Array to JSON Properly

I am trying to pass an array of objects like "make":"Ford", "trim":"escape", "year":2014 into a JSON object car at following exaample
var player = {
    "name":"John",
    "age":30,
    "car": [{"make":"Ford", "trim":"escape", "year":2014 }]
}

but I can not understand why I have to wrap the elemet in{ }.  I mean why the
"car": ["make":"Ford", "trim":"escape", "year":2014 ]

array without {} is not working.  I am not willing to create array of array here so why do I need to wrap theim in {}

A:

Braces {} denote an object.  So basically, {"make":"Ford", "trim":"escape", "year":2014 } would describe a single car. 
if John can only have a single car, you can use something like that:
var player = {
    "name":"John",
    "age":30,
    "car": {"make":"Ford", "trim":"escape", "year":2014 }
}

if John can have multiple cars, then you should use an array like this:
var player = {
    "name":"John",
    "age":30,
    "cars": [{"make":"Ford", "trim":"escape", "year":2014 }, {"make":"Audi", "trim":"RS8", "year":2018 } /* more cars */ ]
}

