Reputation: 97
I'm no aficionado of databases and I'm new to level as I've only dealt with SQL. My question seems simple, while I can put and get key value pairs in level, how do I create a record with more attributes?
So like I have key="president" and value="Nixon", but how can I give that value attributes? ie:
"Nixon":[{"approvalRating": 10, "suitColor":"blue", "firstName":"Richard"}]
How can I interact with level to get results like this?
Thanks
Upvotes: 0
Views: 173
Reputation: 5704
The value can be object so instead of "Nixon" you could pass in
{
lastname: 'Nixon',
firstName:'Richard'
approvalRating: 10,
suitColor:'blue'
}
Upvotes: 2