I would like to create a json object such as this that I can send to the server:
{
"email": "[email protected]",
"profile": {
"token": "test"
}
}
I can create the JSON but don't know how to create one that has multiple objects like the one above. This is what I've done so far
(In Console)
> var dataModel = { email: "[email protected]", token: "sometoken"}
> undefined
> dataModel
> Object {email: "[email protected]", token: "sometoken"}
The token needs to be inside profile
var myVar =bit.